New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: spatial.ConvexHull triggers a seg. fault when given nans. #5450

Closed
WarrenWeckesser opened this Issue Nov 2, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@WarrenWeckesser
Member

WarrenWeckesser commented Nov 2, 2015

This was reported on the Anaconda support email list: https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/FB9KRzGzVHI

I can reproduce the problem on a Mac running OS X 10.9.5 with scipy master:

In [1]: import numpy as np

In [2]: np.__version__
Out[2]: '1.10.1'

In [3]: import scipy

In [4]: scipy.__version__
Out[4]: '0.17.0.dev0+729e5fb'

In [5]: from scipy import spatial

In [6]: points = [[0, 1], [1, 0], [2, 1], [float('nan'), float('nan')]]

In [7]: h = spatial.ConvexHull(points)
/Users/warren/anaconda/bin/python.app: line 3: 71201 Segmentation fault: 11  /Users/warren/anaconda/python.app/Contents/MacOS/python "$@"
~$ 

bernardosulzbach added a commit to bernardosulzbach/scipy that referenced this issue Nov 7, 2015

spatial.ConvexHull raises a ValueError for NaNs.
It used to trigger a Segmentation Fault, which is not a very elegant
way to show that something is wrong. As it should not try to figure
something out of NaNs, it beautifully resigns with a ValueError now.

Fixes scipy#5450

bernardosulzbach added a commit to bernardosulzbach/scipy that referenced this issue Nov 7, 2015

spatial.ConvexHull raises a ValueError for NaNs.
It used to trigger a Segmentation Fault, which is not a very elegant
way to show that something is wrong. As it should not try to figure
something out of NaNs, it beautifully resigns with a ValueError now.

Fixes scipy#5450

bernardosulzbach added a commit to bernardosulzbach/scipy that referenced this issue Nov 7, 2015

ConvexHull should raise ValueError for NaNs.
It used to trigger a Segmentation Fault, which is not a very elegant
way to show that something is wrong. As it should not try to figure
something out of NaNs, it beautifully resigns with a ValueError now.

Fixes scipy#5450

bernardosulzbach added a commit to bernardosulzbach/scipy that referenced this issue Nov 8, 2015

_Qhull should raise ValueError for NaNs.
ConvexHull would trigger a Segmentation Fault, which is not a very
elegant way to show that something is wrong. As it should not try to
figure something out of NaNs, it beautifully resigns with a ValueError
now.

This also reflects on the behavior of Delaunay.

Tests that would pass if they didn't have NaNs have been written for
both classes.

Fixes scipy#5450

@pv pv closed this in #5471 Nov 15, 2015

@pv pv added this to the 0.17.0 milestone Nov 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment