scipy/scipy — pull request #172 by segasai (2012-03-01 22:29:28+00:00)
Title: scipy.interpolate.interpnd class name

Hi,

I've recently tried to pickle the scipy.interpolate.LinearNDInterpolator, and it didn't work:

In [1]: import scipy.interpolate
In [2]: import cPickle
In [3]: ii=scipy.interpolate.LinearNDInterpolator(numpy.random.uniform(size=(100,2)),numpy.arange(100))
In [4]: _tmp=cPickle.dumps(ii)
---------------------------------------------------------------------------
PicklingError Traceback (most recent call last)
/home/koposov/ in ()
----> 1 _tmp=cPickle.dumps(ii)
PicklingError: Can't pickle : import of module interpnd failed

It turns out it is related to the cythonization of the interpnd.pyx
Apparently the "scipy.interpolate." part of the module name wasn't preserved (because of the preprocessing of the file with mako and compilation of the program in the temporary directory).

In my commit I've fixed this issue.