| 27 | */ |
| 28 | |
| 29 | static int |
| 30 | array_contains(PyArrayObject *self, PyObject *el) |
| 31 | { |
| 32 | /* equivalent to (self == el).any() */ |
| 33 | |
| 34 | int ret; |
| 35 | PyObject *res, *any; |
| 36 | |
| 37 | res = PyArray_EnsureAnyArray(PyObject_RichCompare((PyObject *)self, |
| 38 | el, Py_EQ)); |
| 39 | if (res == NULL) { |
| 40 | return -1; |
| 41 | } |
| 42 | |
| 43 | any = PyArray_Any((PyArrayObject *)res, NPY_MAXDIMS, NULL); |
| 44 | Py_DECREF(res); |
| 45 | if (any == NULL) { |
| 46 | return -1; |
| 47 | } |
| 48 | |
| 49 | ret = PyObject_IsTrue(any); |
| 50 | Py_DECREF(any); |
| 51 | return ret; |
| 52 | } |
| 53 | |
| 54 | static PyObject * |
| 55 | array_concat(PyObject *self, PyObject *other) |
nothing calls this directly
no test coverage detected