On Sun, Nov 6, 2011 at 4:15 AM, Thomas Breuel <tmb...@gmail.com> wrote:
> I have a large (and growing) number of variable sized 2D arrays (from
> about 10x10 to about 200x100).
>
> From the mailing list, I gather that I can't store those in a column in a
> table, since there is no VLArrayCol or anything like that.
>
Correct.
>
> I can't quite figure out how to store these in a VLArray either, though.
> It seems the elements of the VLArray can only be variable in one dimension.
>
Correct again. (Note: the HDF5 spec does allow expansion along multiple
dimensions. Save for the lack of hyperspaces in PyTables, I am not
personally aware of why this restriction is here.)
> (I couldn't figure out the mapping of the atom's shape onto the
> permissible dimensions from the documentation, but experimented a bit.)
>
> The best choice seems to be to have an n x 2 array to store the widths and
> heights of the actual arrays, and then store the flattened 2D arrays in the
> VLArray. Is that really the only choice I have?
>
No, it isn't. Another option is that if you have an a priori maximal rank
of each dimension except one, you can always allocate arrays of this shape,
filled with some default value (like NaNs or Infs) and then filter the
non-data out later. For a 4xUnlimited case,
a = [[1, 3, nan, nan, nan],
[2, 16, 46, 190, 45],
[nan, nan, nan, nan, nan],
[nan, 2 , 4, nan, nan]]
> Can anybody help?
>
As always, if you feel like you really need either of the above two cases
it would be great if you took a stab at it yourself and then shared your
feedback / implementation! I'll certainly help in whatever way I can...
Be Well
Anthony
>
> Tom
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Pytables-users mailing list
> Pytables-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pytables-users
>
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users