How does this work ? The hash is computed from a list which contains all the information specific to a type. The hard work is to build the list (_array_descr_walk). The list is built as follows:
System Message: ERROR/3 (<string>
, line 4) Unexpected indentation.
<blockquote>
-
If the dtype is builtin (no fields, no subarray), then the list
System Message: WARNING/2 (<string>
, line 5) Bullet list ends without a blank line; unexpected unindent.
contains 6 items which uniquely define one dtype (_array_descr_builtin) If the dtype is a compound array, one walk on each field. For each field, we append title, names, offset to the final list used for hashing, and then append the list recursively built for each corresponding dtype (_array_descr_walk_fields) If the dtype is a subarray, one adds the shape tuple to the list, and then append the list recursively built for each corresponding dtype (_array_descr_walk_subarray) </blockquote>
Return true if descr is a builtin type
References _normalize_byteorder(), _PyArray_Descr::alignment, _PyArray_Descr::byteorder, _PyArray_Descr::elsize, _PyArray_Descr::flags, and _PyArray_Descr::kind.