Type number of dtype. Note that different values may be returned for equivalent types, e.g. even though ``long`` may be equivalent to ``int`` or ``long long``, they still have different type numbers. Consider using `normalized_num` to avoid this.
| 928 | /// e.g. even though ``long`` may be equivalent to ``int`` or ``long long``, they still have |
| 929 | /// different type numbers. Consider using `normalized_num` to avoid this. |
| 930 | int num() const { |
| 931 | // Note: The signature, `dtype::num` follows the naming of NumPy's public |
| 932 | // Python API (i.e., ``dtype.num``), rather than its internal |
| 933 | // C API (``PyArray_Descr::type_num``). |
| 934 | return detail::array_descriptor_proxy(m_ptr)->type_num; |
| 935 | } |
| 936 | |
| 937 | /// Type number of dtype, normalized to match the return value of `num_of` for equivalent |
| 938 | /// types. This function can be used to write switch statements that correctly handle |