Set the correct dimension attribute for an object
extract_dim(space, dtype)
The space with the selection that was used to read the dataset
The datatype of the dataset
an object that was read from an HDF5 dataset or attribute
x
, but with a new dimension attribute
This function uses the space and the selection in it to set the correct dimension for the resulting object (but without dropping dimensions). Furthermore, if the datatype is an array, those dimensions are correctly determined as well.
Internal use only; currently unused