网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

polyscope库如何在python项目中进行安装-创新互联

今天就跟大家聊聊有关polyscope库如何在python 项目中进行安装,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

成都创新互联是一家专业提供蕉岭企业网站建设,专注与网站设计制作、成都网站制作、H5高端网站建设、小程序制作等业务。10年已为蕉岭众多企业、政府机构等服务。创新互联专业网站设计公司优惠进行中。

安装就可以在环境配置好的情况下使用pip安装:

pip install polyscope

如果提示找不到库文件,no moudle的话可以试着把安装下来的polyscope文件夹放在和想要运行的py文件的同一目录下。
而我们安装下来的polyscope文件夹在哪里呢?它们应该位于安装目录中的"Lib/site-packages"中,我的如下图所示:

polyscope库如何在python 项目中进行安装

但是装好之后我们运行一个网上的例程:

import polyscope as ps

# Initialize polyscope
ps.init()

### Register a point cloud
# `my_points` is a Nx3 numpy array
ps.register_point_cloud("my points", my_points)

### Register a mesh
# `verts` is a Nx3 numpy array of vertex positions
# `faces` is a Fx3 array of indices, or a nested list
ps.register_surface_mesh("my mesh", verts, faces, smooth_shade=True)

# Add a scalar function and a vector function defined on the mesh
# vertex_scalar is a length V numpy array of values
# face_vectors is an Fx3 array of vectors per face
ps.get_surface_mesh("my mesh").add_scalar_quantity("my_scalar", 
    vertex_scalar, defined_on='vertices', cmap='blues')
ps.get_surface_mesh("my mesh").add_vector_quantity("my_vector", 
    face_vectors, defined_on='faces', color=(0.2, 0.5, 0.5))

# View the point cloud and mesh we just registered in the 3D UI
ps.show()

新闻名称:polyscope库如何在python项目中进行安装-创新互联
当前链接:http://bjjierui.cn/article/doidis.html

其他资讯