Conversation
| export type CharSet = (typeof H5T_TO_CHAR_SET)[H5T_CSET]; | ||
| export type StrPad = (typeof H5T_TO_STR_PAD)[H5T_STR]; | ||
|
|
||
| export type NumericType = IntegerType | FloatType; |
There was a problem hiding this comment.
We still keep a NumericType as that's still useful throughout the codebase.
|
I am not awfully convinced by this. Personally, I have always valued descriptive values over flags. Also
Is that really true ? As far as I can see, unsigned and signed integers are separate datatypes: https://support.hdfgroup.org/documentation/hdf5/latest/group___p_d_t_s_t_d.html So unless this lays ground for another future refactoring, I need a little more to go along 😄 |
|
I was referring to the |
|
So the idea is to bring Another argument is that the (I'd like to split |
The goal is to split
NumericTypeinto two dtypes:IntegerTypeandFloatType, and to replaceDTypeClass.Unsignedwith asignedboolean inIntegerType.I had first planned to introduce this change as part of adding support for big integers (cf. #1679 (comment)). At the time I wanted to introduce a new
DTypecalledBigIntegerTypeand it didn't really make sense to have this dtype together withNumericType... I'm now going back on this solution for reasons I'll explain soon, but I find that theNumericTyperefactoring still makes sense.IntegerType/FloatTypebrings us closer to the HDF5 types, and representing the sign as a boolean avoids relying on theDTypeClassenum's value too much in the metadata viewer (i.e. "Integer (unsigned)").