[SciPy-user] scipy general_function segfault

Pearu Peterson pearu at scipy.org
Wed Sep 17 15:34:50 EDT 2003


On Wed, 17 Sep 2003, Arnd Baecker wrote:

> it seems that scipy.special.general_function
> (which allows to "vectorize" any scalar function)
> is broken (at least in two of my installations ;-)
> leading to a segmentation fault.
> 
> A simple example for the problem is:
> 
> #################################################
> from scipy import *
> 
> def addsubtract(a,b):
>     if a > b:
>         return a - b
>     else:
>         return a + b
> 
> gfunc=special.general_function(addsubtract)
> gfunc([0,3,6,9],[1,3,5,7])
> #################################################
> 
> 
> For me it does work with
>    Python 2.2.2, scipy.__version__: '0.2.0_alpha_183.4048'
> However,
>   Python 2.2.3, scipy.__version__, '0.2.0_alpha_200.4160'
>   Python 2.3,   scipy.__version__, '0.2.0_alpha_210.4098'
> fail with a  segmentation fault.

Works here on debian with

Python 2.2.3+, Scipy 0.2.0_alpha_211.4108
Python 2.1.3+, Scipy 0.2.0_alpha_197.4143
Python 2.3b2+, Scipy 0.2.0_alpha_211.4108

but fails with a segfault with

Python 2.3b2+, Scipy 0.2.0_alpha_202.4187

So, try the latest Scipy from CVS.

Pearu







More information about the SciPy-User mailing list