Returns true for structured data types.
| 901 | |
| 902 | /// Returns true for structured data types. |
| 903 | bool has_fields() const { |
| 904 | if (detail::npy_api::get().PyArray_RUNTIME_VERSION_ < 0x12) { |
| 905 | return detail::array_descriptor1_proxy(m_ptr)->names != nullptr; |
| 906 | } |
| 907 | const auto *proxy = detail::array_descriptor2_proxy(m_ptr); |
| 908 | if (proxy->type_num < 0 || proxy->type_num >= 2056) { |
| 909 | return false; |
| 910 | } |
| 911 | return proxy->names != nullptr; |
| 912 | } |
| 913 | |
| 914 | /// Single-character code for dtype's kind. |
| 915 | /// For example, floating point types are 'f' and integral types are 'i'. |