[SciPy-user] Cookbook: Interpolation of an N-D curve error
David Huard
david.huard at gmail.com
Mon Jun 19 10:00:08 EDT 2006
Hi Angus,
I updated scipy and numpy this morning, and the example ran fine, except for
the import Float64 statement that has to be changed to float64. You may want
to turn pdb on in ipython and find out what variable is triggering the
exception. I'd like to help more but I have no idea what is going on in your
case.
Did you modify the example or ran it as is?
David
2006/6/16, Angus McMorland <a.mcmorland at auckland.ac.nz>:
>
> 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.
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20060619/27afeb8c/attachment.html>
More information about the SciPy-User
mailing list