2006/7/24, PGM <pgm...@gm...>:
>
> Folks ,
> I'm still using numpy 0.9.8 and just ran into this problem on my machine
> (AMD64):
>
> >>> import numpy as N
> >>> x = N.array([1.23456])
> >>> print divmod(x,1)
> (array([ 1.]), array([ 0.23456]))
> >>> print divmod(x[0],1)
> ()
> >>> print divmod(x.tolist()[0],1)
> (1.0, 0.2345600000000001)
>
> divmod doesn't seem to like '<f8's. Forcing x to '<f4' seems to do the
> trick...
> Did anybody run into this problem already ? Is it really numpy related ?
> If
> this is a bug on 0.9.8, has it been corrected already ?
It works in svn.
David
|