| 50 | |
| 51 | |
| 52 | NPY_NO_EXPORT PyObject * |
| 53 | array_repr(PyArrayObject *self) |
| 54 | { |
| 55 | static PyObject *repr = NULL; |
| 56 | |
| 57 | if (PyArray_ReprFunction != NULL) { |
| 58 | return PyObject_CallFunctionObjArgs(PyArray_ReprFunction, self, NULL); |
| 59 | } |
| 60 | |
| 61 | /* |
| 62 | * We need to do a delayed import here as initialization on module load |
| 63 | * leads to circular import problems. |
| 64 | */ |
| 65 | npy_cache_import("numpy.core.arrayprint", "_default_array_repr", &repr); |
| 66 | if (repr == NULL) { |
| 67 | npy_PyErr_SetStringChained(PyExc_RuntimeError, |
| 68 | "Unable to configure default ndarray.__repr__"); |
| 69 | return NULL; |
| 70 | } |
| 71 | return PyObject_CallFunctionObjArgs(repr, self, NULL); |
| 72 | } |
| 73 | |
| 74 | |
| 75 | NPY_NO_EXPORT PyObject * |
nothing calls this directly
no test coverage detected