| 73 | |
| 74 | |
| 75 | NPY_NO_EXPORT PyObject * |
| 76 | array_str(PyArrayObject *self) |
| 77 | { |
| 78 | static PyObject *str = NULL; |
| 79 | |
| 80 | if (PyArray_StrFunction != NULL) { |
| 81 | return PyObject_CallFunctionObjArgs(PyArray_StrFunction, self, NULL); |
| 82 | } |
| 83 | |
| 84 | /* |
| 85 | * We need to do a delayed import here as initialization on module load leads |
| 86 | * to circular import problems. |
| 87 | */ |
| 88 | npy_cache_import("numpy.core.arrayprint", "_default_array_str", &str); |
| 89 | if (str == NULL) { |
| 90 | npy_PyErr_SetStringChained(PyExc_RuntimeError, |
| 91 | "Unable to configure default ndarray.__str__"); |
| 92 | return NULL; |
| 93 | } |
| 94 | return PyObject_CallFunctionObjArgs(str, self, NULL); |
| 95 | } |
| 96 | |
| 97 | |
| 98 | NPY_NO_EXPORT PyObject * |
nothing calls this directly
no test coverage detected