Hmm, I'm not sure... Could you use the combination of H5Tvlen_create and array or compound datatype?
________________________________ From: Hdf-forum <[email protected]> on behalf of Steven Walton <[email protected]> Sent: Monday, October 17, 2016 12:42 PM To: HDF Users Discussion List Subject: Re: [Hdf-forum] Irregular 2D array write (C++) In this case I need integers, but I would prefer how to know how to do it for an arbitrary type. Is there going to be a difference? On Mon, Oct 17, 2016 at 11:39 AM, Binh-Minh Ribler <[email protected]<mailto:[email protected]>> wrote: Hi Steven, Would variable-length datatype do what you need? Binh-Minh ________________________________ From: Hdf-forum <[email protected]<mailto:[email protected]>> on behalf of Steven Walton <[email protected]<mailto:[email protected]>> Sent: Monday, October 17, 2016 12:34 PM To: HDF Users Discussion List Subject: [Hdf-forum] Irregular 2D array write (C++) So I'm wondering if there is a good way to write an irregular shaped 2D array into hdf5. And example of this would be like storing vtk node connections for an unstructured grid. First number noting the cell type and the next numbers denoting the nodes. 9 23 41 54 12 9 46 29 19 60 5 93 18 58 5 29 58 17 9 50 38 58 95 So the array has some rows that are length 5 and others that are length 4 (or arbitrary). I understand how to do this with C++ vectors and push_back, but those don't create contiguous arrays. Is there another way to create this in a way that HDF would accept? -Steven _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected]<mailto:[email protected]> http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
