Hola Francesc,

I'm trying to combine EArray nodes from two separate files into a single 
file. The problem seems to be with the append method. 

 >>> print tables.__version__
1.3
 >>> print numarray.__version__
1.5.1
 >>> master = tables.openFile('heck1.h5', 'a')
 >>> node = master.root.results.ogpfb1.appload
 >>> node
/results/ogpfb1/appload (EArray(124L, 6952L, 6L), zlib(6)) ''
  atom = Atom(dtype='Float32', shape=(0, 6952L, 6L), flavor='numarray')
  nrows = 124
  extdim = 0
  flavor = 'numarray'
  byteorder = 'big'
>>> fh = tables.openFile('heck2.h5')
>>> bigbuf = fh.root.results.ogpfb1.appload[:]
>>> bigbuf.shape
(123, 6952, 6)
>>> node.append(bigbuf)
>>> node
/results/ogpfb1/appload (EArray(247L, 6952L, 6L), zlib(6)) ''
  atom = Atom(dtype='Float32', shape=(0, 6952L, 6L), flavor='numarray')
  nrows = 247
  extdim = 0
  flavor = 'numarray'
  byteorder = 'big'
>>> assert node[-1,-1,-1] == bigbuf[-1,-1,-1]
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AssertionError
>>> bigbuf[-1,-1]
array([ -1.51880996e+04,   1.79550003e+02,  -2.02230005e+03,
         1.89211500e+05,  -1.05684000e+05,  -2.11816500e+05], 
type=Float32)
>>> node[-1,-1]
array([  2.46069298e+23,  -2.94021216e+08,  -8.35400165e-23,
        -1.14265963e+20,   9.80874033e-39,   3.69827696e-19], 
type=Float32)

I end up with the correct shape, but the data is corrupt. I can work 
around this by using numarray.concatenate and then just create a new node, 
but if you have any idea what I'm doing wrong, I would love to have your 
input. Btw, the files were not created by PyTables.

PyTables 1.3
numarray 1.5.1

Elias Collas
Stress Methods Developer
Gulfstream Aerospace Corp

Feliz Navidad y Prospero Año
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to