Hi James,
A Monday 09 March 2009, James Amundson escrigué:
> Hi,
>
> I have some code that collects arrays of doubles from several
> different processors in a parallel environment, then writes the whole
> set to one big file as a single array. Each processor i has an array
> of size (6,ni), where the ni = n1, n2, n3... are all different. In
> PyTables 1.3.1, I accomplished this with
>
> ...
> atom = tables.Atom(dtype='Float64',shape=(7,0))
> earray = f.createEArray(f.root,'particles',atom,'Float64',
> filters = filter)
> ...
> earray.append(parts)
>
> The attached program old.py has a working simplified example. I tried
> to modify this for PyTables 2.1 by doing
>
> ...
> atom = tables.Float64Atom(shape=(7,0))
> earray = f.createEArray(f.root,'particles',atom,(7,0),
> filters = filter)
> ...
Yeah. In PyTables 2.x series the shape of the dataset is specified just
in the leaf constructor. So, what you need is:
atom = tables.Float64Atom()
earray = f.createEArray(f.root,'particles',atom,(7,0),
filters = filter)
HTH,
--
Francesc Alted
------------------------------------------------------------------------------
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users