summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/arraymethods.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/arraymethods.c b/numpy/core/src/arraymethods.c
index e8fb3244e..4927f184b 100644
--- a/numpy/core/src/arraymethods.c
+++ b/numpy/core/src/arraymethods.c
@@ -685,7 +685,7 @@ array_cast(PyArrayObject *self, PyObject *args)
return NULL;
}
- if (descr == self->descr) {
+ if (PyArray_EquivTypes(descr, self->descr)) {
obj = _ARET(PyArray_NewCopy(self,NPY_ANYORDER));
Py_XDECREF(descr);
return obj;