On Sat, May 14, 2011 at 9:52 AM, Pauli Virtanen <pav@iki.fi> wrote:
On Sat, 14 May 2011 00:08:24 +0100, Paul Kuin wrote:
scipy.interpolate.fitpack.bisplrep fails, For certain arrays scipy.interpolate.fitpack.bisplrep fails, since the fortran code called expects an integer for the dimension size of certain arrays:
Floats will be automatically cast to integers, so this by itself cannot cause any errors.
It does when the parameter is not cast to an integer and passed to the fortran library.
Please give example code that fails (how does it fail?) -- otherwise it will be difficult to determine the actual cause.
The failure was an error message from the fortran code. I recognized it since I have been working with it outside python. Unfortunately I cannot give an easy snippet of code and I have time limitations now. My old Macbook crashed and when migrating, I decided to go with the STScI python package. When I ran tests this was the only bug my code stumbled upon, which I fixed. So I wanted to share the fix. You say it was already patched. So I don't think more is needed. Thanks for checking this out though. All your efforts help more than you think!
line 760-761 of fitpack.py should be modified to if nxest is None: nxest=int(kx+sqrt(m/2)) if nyest is None: nyest=int(ky+sqrt(m/2)) to make sure nxest, and nyest are integer.
That was already changed to be so in Scipy 0.9.
-- Pauli Virtanne
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
-- * * * * * * * * http://www.mssl.ucl.ac.uk/~npmk/ * * * * Dr. N.P.M. Kuin (npmk@mssl.ucl.ac.uk) Mullard Space Science Laboratory – University College London – Holmbury St Mary – Dorking – Surrey RH5 6NT– U.K.