NUMPY_API * Set the array print function to be a Python function. */
| 28 | * Set the array print function to be a Python function. |
| 29 | */ |
| 30 | NPY_NO_EXPORT void |
| 31 | PyArray_SetStringFunction(PyObject *op, int repr) |
| 32 | { |
| 33 | if (repr) { |
| 34 | /* Dispose of previous callback */ |
| 35 | Py_XDECREF(PyArray_ReprFunction); |
| 36 | /* Add a reference to new callback */ |
| 37 | Py_XINCREF(op); |
| 38 | /* Remember new callback */ |
| 39 | PyArray_ReprFunction = op; |
| 40 | } |
| 41 | else { |
| 42 | /* Dispose of previous callback */ |
| 43 | Py_XDECREF(PyArray_StrFunction); |
| 44 | /* Add a reference to new callback */ |
| 45 | Py_XINCREF(op); |
| 46 | /* Remember new callback */ |
| 47 | PyArray_StrFunction = op; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | |
| 52 | NPY_NO_EXPORT PyObject * |
no outgoing calls
no test coverage detected