NUMPY_API * Get typenum from an object -- None goes to NPY_DEFAULT_TYPE * This function takes a Python object representing a type and converts it * to a the correct PyArray_Descr * structure to describe the type. * * Many objects can be used to represent a data-type which in NumPy is * quite a flexible concept. * * This is the central code that converts Python objects to * Type-descriptor
| 1714 | * a reference to the input obj. |
| 1715 | */ |
| 1716 | NPY_NO_EXPORT int |
| 1717 | PyArray_DescrConverter(PyObject *obj, PyArray_Descr **at) |
| 1718 | { |
| 1719 | *at = _convert_from_any(obj, 0); |
| 1720 | return (*at) ? NPY_SUCCEED : NPY_FAIL; |
| 1721 | } |
| 1722 | |
| 1723 | /** Convert a bytestring specification into a dtype */ |
| 1724 | static PyArray_Descr * |