[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 '0.4.3.1366'
>>> f = scipy.array(0.0, scipy.float64)
>>> f
array(0.0)
>>> f.shape
()
>>> scipy.rank(f)
0
>>> f[0]
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
IndexError: 0-d arrays can't be indexed
>>> f[0] = 10
>>> f
array(10.0)
>>> 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