| 242 | } |
| 243 | |
| 244 | Status SetNdarrayBase(PyArrayObject* arr, PyObject* base) { |
| 245 | if (PyArray_SetBaseObject(arr, base) == -1) { |
| 246 | // Error occurred, trust that SetBaseObject sets the error state |
| 247 | Py_XDECREF(base); |
| 248 | RETURN_IF_PYERROR(); |
| 249 | } |
| 250 | return Status::OK(); |
| 251 | } |
| 252 | |
| 253 | Status SetBufferBase(PyArrayObject* arr, const std::shared_ptr<Buffer>& buffer) { |
| 254 | PyObject* base; |
no test coverage detected