Skip to content

Improved the handling of numpy scalars in cfoods.h5.h5_attr_to_property

These changes improve the handling of numpy scalars (whether literal scalars inheriting from numpy.generic or 0-dimensional numpy.ndarray) by cfoods.h5.h5_attr_to_property. It uses the fact that numpy ndarrays and scalars all have the tolist method which works the same (for scalars, one gets a scalar value instead of a list) and no special handling has to be done except for the datatype if the number of dimensions is not 0.

Merge request reports