[SciPy-user] scipy general_function segfault

Travis E. Oliphant scipy-user@scipy.net
Wed, 17 Sep 2003 14:50:33 -0600


Arnd Baecker wrote:
> Hi,
> 
> 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'

Did you recompile Numeric with the new Python versions (and does scipy 
see the correct include files?

I will check on this at some point.  These kinds of problems are 
(almost) always related to incorrect include files and /or Numeric 
binaries not compatible with the new Python.

-Travis