[Numpy-discussion] float64scalar and divmod (and numpy 0.9.8)

David Huard david.huard at gmail.com
Mon Jul 24 06:58:50 CDT 2006


2006/7/24, PGM <pgmdevlist at gmail.com>:
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060724/89d60b0f/attachment-0001.html 


More information about the Numpy-discussion mailing list