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

PGM pgmdevlist at gmail.com
Mon Jul 24 05:02:24 CDT 2006

Folks ,
I'm still using numpy 0.9.8 and just ran into this problem on my machine 

>>> 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 
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 ?

Thanks a lot

More information about the Numpy-discussion mailing list