[SciPy-user] scipy general_function segfault

Arnd Baecker scipy-user@scipy.net
Wed, 17 Sep 2003 21:04:12 +0200 (CEST)


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'
fail with a  segmentation fault.


Can someone confirm this problem
(for which python/scipy version?)

Even better would be a fix for this ... ;-)

Many thanks,

Arnd