Describe the bug
Writing a uint32 array to disk, then reading it back with HighFive returns a int32 array.
inline DataTypeClass DataType::getClass() const {
return convert_type_class(detail::h5t_get_class(_hid));
}
(https://github.com/highfive-devs/highfive/blob/main/include/highfive/bits/H5DataType_misc.hpp#L36-L38)
inline DataTypeClass convert_type_class(const H5T_class_t& tclass) {
switch (tclass) {
case H5T_TIME:
return DataTypeClass::Time;
case H5T_INTEGER:
return DataTypeClass::Integer;
...
(https://github.com/highfive-devs/highfive/blob/main/include/highfive/bits/H5DataType_misc.hpp#L365)
convert_type_class() should probably also call H5Tget_sign() in case of integers, then return a new DataTypeClass::UnsignedInteger. Alternatively, could add a DataType::isSigned() member to DataType that queries this information.
Describe the bug
Writing a
uint32array to disk, then reading it back with HighFive returns aint32array.(https://github.com/highfive-devs/highfive/blob/main/include/highfive/bits/H5DataType_misc.hpp#L36-L38)
(https://github.com/highfive-devs/highfive/blob/main/include/highfive/bits/H5DataType_misc.hpp#L365)
convert_type_class()should probably also callH5Tget_sign()in case of integers, then return a newDataTypeClass::UnsignedInteger. Alternatively, could add aDataType::isSigned()member toDataTypethat queries this information.