#44 error saving numpy.float64

closed-duplicate
nobody
None
5
2007-10-17
2007-01-04
No

hi,

i encountered an error saving a numpy scalar of type float64. (i am using intel mac osx with python 2.5)
the following program reproduces the error:

from tables import openFile
from numpy import float,float64

# this function saves the variable tmp and loads it again
def test(tmp):
fil = openFile('tmp.h5',mode="w",title='tmp')
fil.createArray(fil.root,'var',tmp)
fil.close()
fil = openFile('tmp.h5',mode="r")
tmp = fil.getNode(fil.root,'var').read()
fil.close()
return tmp

>>> test(float(1))
1.0
>>> fest(float64(1))
2.1363235070432714e-308

Discussion

  • Ivan Vilata i Balaguer

    • status: open --> closed-duplicate