Helper for ufunc_at, below */
| 5916 | |
| 5917 | /* Helper for ufunc_at, below */ |
| 5918 | static inline PyArrayObject * |
| 5919 | new_array_op(PyArrayObject *op_array, char *data) |
| 5920 | { |
| 5921 | npy_intp dims[1] = {1}; |
| 5922 | Py_INCREF(PyArray_DESCR(op_array)); /* NewFromDescr steals a reference */ |
| 5923 | PyObject *r = PyArray_NewFromDescr(&PyArray_Type, PyArray_DESCR(op_array), |
| 5924 | 1, dims, NULL, data, |
| 5925 | NPY_ARRAY_WRITEABLE, NULL); |
| 5926 | return (PyArrayObject *)r; |
| 5927 | } |
| 5928 | |
| 5929 | /* |
| 5930 | * Use an indexed loop to do the work |
no test coverage detected