[SciPy-dev] Segmentation fault triggered by optimize/lbfgsb.py

Ed Schofield schofield at ftw.at
Thu Oct 27 11:55:25 CDT 2005

Travis Oliphant wrote:

>Ed Schofield wrote:
>>The code in optimize/lbfgsb.py raises an exception and then dumps core ...
>One part of the problem has been fixed in new scipy core. 
I've unearthed some more problems with rank-0 arrays.

>>> import scipy       # base version ''
>>> f = scipy.array(0.0, scipy.float64)
>>> f
>>> f.shape
>>> scipy.rank(f)
>>> f[0]
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
IndexError: 0-d arrays can't be indexed
>>> f[0] = 10
>>> f
>>> f[-1] = 10
Segmentation fault

I've committed a patch that fixes the first bug; now assigning to f[0]
throws an IndexError like reading from f[0] does.  The second bug is
still there.

Is there a way to build scipy with debugging symbols using distutils? 
If not, how would you recommend doing this?

-- Ed

More information about the Scipy-dev mailing list