Type number of dtype, normalized to match the return value of `num_of` for equivalent types. This function can be used to write switch statements that correctly handle equivalent types with different type numbers.
| 938 | /// types. This function can be used to write switch statements that correctly handle |
| 939 | /// equivalent types with different type numbers. |
| 940 | int normalized_num() const { |
| 941 | int value = num(); |
| 942 | if (value >= 0 && value <= detail::npy_api::NPY_VOID_) { |
| 943 | return detail::normalized_dtype_num[value]; |
| 944 | } |
| 945 | return value; |
| 946 | } |
| 947 | |
| 948 | /// Single character for byteorder |
| 949 | char byteorder() const { return detail::array_descriptor_proxy(m_ptr)->byteorder; } |
no outgoing calls