| 2009 | }; |
| 2010 | |
| 2011 | static PyObject * |
| 2012 | arraydescr_subdescr_get(PyArray_Descr *self, void *NPY_UNUSED(ignored)) |
| 2013 | { |
| 2014 | if (!PyDataType_HASSUBARRAY(self)) { |
| 2015 | Py_RETURN_NONE; |
| 2016 | } |
| 2017 | return Py_BuildValue("OO", |
| 2018 | (PyObject *)self->subarray->base, self->subarray->shape); |
| 2019 | } |
| 2020 | |
| 2021 | NPY_NO_EXPORT PyObject * |
| 2022 | arraydescr_protocol_typestr_get(PyArray_Descr *self, void *NPY_UNUSED(ignored)) |