| 3307 | } |
| 3308 | |
| 3309 | static PyObject * |
| 3310 | array_set_ops_function(PyObject *NPY_UNUSED(self), PyObject *NPY_UNUSED(args), |
| 3311 | PyObject *kwds) |
| 3312 | { |
| 3313 | PyObject *oldops = NULL; |
| 3314 | |
| 3315 | if ((oldops = _PyArray_GetNumericOps()) == NULL) { |
| 3316 | return NULL; |
| 3317 | } |
| 3318 | /* |
| 3319 | * Should probably ensure that objects are at least callable |
| 3320 | * Leave this to the caller for now --- error will be raised |
| 3321 | * later when use is attempted |
| 3322 | */ |
| 3323 | if (kwds && PyArray_SetNumericOps(kwds) == -1) { |
| 3324 | Py_DECREF(oldops); |
| 3325 | if (PyErr_Occurred() == NULL) { |
| 3326 | PyErr_SetString(PyExc_ValueError, |
| 3327 | "one or more objects not callable"); |
| 3328 | } |
| 3329 | return NULL; |
| 3330 | } |
| 3331 | return oldops; |
| 3332 | } |
| 3333 | |
| 3334 | static PyObject * |
| 3335 | array_set_datetimeparse_function(PyObject *NPY_UNUSED(self), |
nothing calls this directly
no test coverage detected