Voronoi_from_points_numpy

#1

I have updated COMPAS to the current version and couldn’t find 'voronoi_from_points_numpy '. Is it there in the current version under a different name? But it still appears in the website. https://compas-dev.github.io/main/api/generated/compas.geometry.voronoi_from_points_numpy.html#compas.geometry.voronoi_from_points_numpy

#2

not sure where you have been looking but it should still be there…

17

#3

I get the following error when trying to import : “ImportError: cannot import name voronoi_from_points_numpy”.

#4

are you by any chance trying to import this in Rhino?

#5

No, I am running this as a python file in PyCharm

#6

can you try it in the terminal to make sure it has nothing to do with pycharm?

#7

Still no (unless I am doing something wrong here)

#8

can you import numpy?

from numpy import array

the function is clearly there, but you get an error related to some fundamental numpy imports…

can you try to create a new environment with python3 and COMPAS? activate the environment, check the version of COMPAS and numpy, and then try importing the function again…

conda create -n test python=3.7 COMPAS=0.5.2
conda activate test
>>> import compas
>>> compas.__version__
'0.5.2'
>>> import numpy
>>> numpy.__version__
'1.16.2'
>>> from compas.geometry import voronoi_from_points_numpy
1 Like
#9

Got it to work. There were issues with installation of both numpy and COMPAS in pyCharm.