[SciPy-User] Saving results of rbf function

Borís BURLE boris.burle at univ-provence.fr
Fri Nov 5 03:59:50 EDT 2010


Dear scipy experts,

I would like to save on disk the results of an rbf estimation for later 
re-use. The (pseudo)code would look like this

1 import scipy.interpolate as interp
2 rbfi = interp.Rbf(a,b,c)

3 save("filename", rbfi)
4 rbfi = load("filename")

5 c_new = rbfi(a_new,b_new)

I have tried to save the results (line 3) with numpy.save, but got an 
error message

Can't pickle <type 'instancemethod'>: attribute lookup 
__builtin__.instancemethod failed

Google search indicated that this is a known issue.
Do you have an idea on how to save the results of the rbf to avoid 
recomputing it every time I need it ?

     Thank you very much for your help,
           best,
                 B.

-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ATTENTION NOUVELLES COORDONNEES / WARNING NEW CONTACT DETAILS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Boris BURLE
Laboratoire de Neurobiologie de la Cognition
Pôle 3C, Université de Provence, CNRS
tel: (+33) 4 13 55 09 40
fax: (+33) 4 13 55 09 58
web page:  http://sites.univ-provence.fr/lnc/




More information about the SciPy-User mailing list