[SciPy-user] Cookbook: Interpolation of an N-D curve error

Angus McMorland a.mcmorland at auckland.ac.nz
Fri Jun 16 22:56:04 CDT 2006


Hi all,

I'm getting a TypeError when trying the N-D curve cookbook example
(http://www.scipy.org/Cookbook/Interpolation) with numpy 0.9.9.2630 and
scipy 0.5.0.1979.

The error is:

In [158]: tckp,u = splprep([x,y,z],s=s,k=k,nest=-1)
---------------------------------------------------------------------------
exceptions.TypeError                                 Traceback (most
recent call last)

[snip]<ipython console>

/usr/lib/python2.3/site-packages/scipy/interpolate/fitpack.py in
splprep(x, w, u, ub, ue, k, task, s, t, full_output, nest, per, quiet)
    215     iwrk=_parcur_cache['iwrk']
    216
t,c,o=_fitpack._parcur(ravel(transpose(x)),w,u,ub,ue,k,task,ipar,s,t,
--> 217                              nest,wrk,iwrk,per)
    218     _parcur_cache['u']=o['u']
    219     _parcur_cache['ub']=o['ub']

TypeError: array cannot be safely cast to required type

I'm guessing either (a) something is wrong in the code, or more likely,
(b) something's been deliberately changed and the example needs
updating, or (a distinct possibility) (c) I'm doing something wrong.

Cheers,

Angus.
-- 
Angus McMorland
email a.mcmorland at auckland.ac.nz
mobile +64-21-155-4906

PhD Student, Neurophysiology / Multiphoton & Confocal Imaging
Physiology, University of Auckland
phone +64-9-3737-599 x89707

Armourer, Auckland University Fencing
Secretary, Fencing North Inc.



More information about the SciPy-user mailing list