pythonhdf5h5py

How to get the memory layout of a HDF5 array with h5py?


In numpy one can check whether an array is C-ordered or F-ordered with my_array.flags. What is the equivalent for a HDF5 dataset read with h5py?


Solution

  • From the documentation:

    An HDF5 dataset created with the default settings will be contiguous; in other words, laid out on disk in traditional C order.

    Checkout this question for more details. Long story short, your arrays are automatically converted if needed and everything is stored in C order.