Coder Social home page Coder Social logo

pydata-london-2016-voronoi's People

Contributors

niknow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pydata-london-2016-voronoi's Issues

issues with the sort_vertices_of_regions()

Hello,

When i run this simple portion of code


import numpy as np
from scipy.spatial import SphericalVoronoi, distance
from scipy.spatial import _spherical_voronoi as spherical_voronoi

test = np.array([[-0.1382177 , -0.66701253,  0.36649207],
       [-0.33718559, -0.0515926 ,  0.7109696 ],
       [-0.13633904, -0.65712506,  0.3830903 ],
       [ 0.04510981,  0.72285262,  0.35677763],
       [-0.14008791, -0.65997704,  0.37445958],
       [-0.7253343 , -0.26837762,  0.00655405],
       [-0.58085674, -0.40511863, -0.36093304],
       [ 0.2780397 ,  0.72729778,  0.24511902],
       [-0.33315233, -0.16453994, -0.6972229 ],
       [-0.46532148,  0.35901168, -0.45935981],
       [-0.72827086, -0.25884677, -0.00137087],
       [-0.72758263, -0.25989862,  0.00278446],
       [-0.70204518, -0.31395337, -0.0467136 ],
       [-0.71771464, -0.28226784, -0.01436788],
       [-0.72884793, -0.25239507,  0.01278218],
       [-0.72528059, -0.26018933, -0.00931674],
       [ 0.23175783, -0.68754004,  0.24004559],
       [ 0.69090723, -0.2371959 , -0.19492292],
       [ 0.40653046, -0.63173528, -0.25505239],
       [ 0.53203067, -0.52945865, -0.14520801],
       [ 0.52527016, -0.53501648, -0.2155609 ],
       [ 0.56226738, -0.31942141, -0.39975375]])
	   
sv = SphericalVoronoi(test)
sv.sort_vertices_of_regions()

I get the following error :

Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul  2 2016, 17:42:40) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import numpy as np
>>> from scipy.spatial import SphericalVoronoi, distance
>>> from scipy.spatial import _spherical_voronoi as spherical_voronoi
>>>
>>> test = np.array([[-0.1382177 , -0.66701253,  0.36649207],
...        [-0.33718559, -0.0515926 ,  0.7109696 ],
...        [-0.13633904, -0.65712506,  0.3830903 ],
...        [ 0.04510981,  0.72285262,  0.35677763],
...        [-0.14008791, -0.65997704,  0.37445958],
...        [-0.7253343 , -0.26837762,  0.00655405],
...        [-0.58085674, -0.40511863, -0.36093304],
...        [ 0.2780397 ,  0.72729778,  0.24511902],
...        [-0.33315233, -0.16453994, -0.6972229 ],
...        [-0.46532148,  0.35901168, -0.45935981],
...        [-0.72827086, -0.25884677, -0.00137087],
...        [-0.72758263, -0.25989862,  0.00278446],
...        [-0.70204518, -0.31395337, -0.0467136 ],
...        [-0.71771464, -0.28226784, -0.01436788],
...        [-0.72884793, -0.25239507,  0.01278218],
...        [-0.72528059, -0.26018933, -0.00931674],
...        [ 0.23175783, -0.68754004,  0.24004559],
...        [ 0.69090723, -0.2371959 , -0.19492292],
...        [ 0.40653046, -0.63173528, -0.25505239],
...        [ 0.53203067, -0.52945865, -0.14520801],
...        [ 0.52527016, -0.53501648, -0.2155609 ],
...        [ 0.56226738, -0.31942141, -0.39975375]])
>>> 
>>> sv = SphericalVoronoi(test)
>>> sv.sort_vertices_of_regions()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/env/export/cns_n02_agc/agc/home/ggautrea/anaconda2/lib/python2.7/site-packages/scipy/spatial/_spherical_voronoi.py", line 319, in sort_vertices_of_regions
    ][0]
IndexError: list index out of range

Can you help me ?
Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.