[Numpy-tickets] [NumPy] #482: crash on fancy indexing
NumPy
numpy-tickets@scipy....
Mon Mar 26 15:04:20 CDT 2007
#482: crash on fancy indexing
------------------------+---------------------------------------------------
Reporter: pv | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.core | Version: 1.0.1
Severity: major | Keywords: indexing crash
------------------------+---------------------------------------------------
The following code crashes, but not always: (on numpy 1.0.1)
{{{
import numpy as N
A = N.zeros((800, 7, 8))
B = N.zeros((6,6)) + 1
print N.__version__, N.__file__
for i in xrange(800):
A[N.ix_([i], [0,1,2,3,5,6], [0,1,2,3,4,5])] = B # crash here
print "no crash"
}}}
It's probably a "non-local" error, since puzzling things happen
{{{
$ echo x${PYTHONPATH}x
xx
$ python2.4 xxx.py
1.0.1 /usr/lib/python2.4/site-packages/numpy/__init__.pyc
no crash
$ PYTHONPATH=this-path-doesnt-exist python2.4 xxx.py
1.0.1 /usr/lib/python2.4/site-packages/numpy/__init__.pyc
Segmentation fault (core dumped)
$ PYTHONPATH= python2.4 xxx.py
1.0.1 /usr/lib/python2.4/site-packages/numpy/__init__.pyc
Segmentation fault (core dumped)
}}}
There are no lurking numpy installations or source dirs, only the one in
/usr. I have been able to reproduce this on different machines (different
gcc, processors, and build options). Also, although this crashes on
python2.4, there is no crash on python2.5.
Stack trace & some debug info attached.
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/482>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list