summaryrefslogtreecommitdiff
path: root/numpy/core/src/arrayobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-03-03 23:40:17 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-03-03 23:40:17 +0000
commitd5c0229e1ac366b43bc35c9fdbf6d0f102d00539 (patch)
tree20525b576ae41ff6ea866f1c1a4744e3ad361741 /numpy/core/src/arrayobject.c
parent07a9750e934ad45f086b73b9f9f114ea4b2fcdd1 (diff)
downloadnumpy-d5c0229e1ac366b43bc35c9fdbf6d0f102d00539.tar.gz
Fix bug when ENSURECOPY was present but types are different.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r--numpy/core/src/arrayobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c
index 739dc69c7..65443ecd9 100644
--- a/numpy/core/src/arrayobject.c
+++ b/numpy/core/src/arrayobject.c
@@ -5776,7 +5776,7 @@ PyArray_FromArray(PyArrayObject *arr, PyArray_Descr *newtype, int flags)
itemsize = newtype->elsize;
/* Don't copy if sizes are compatible */
- if (PyArray_EquivTypes(oldtype, newtype)) {
+ if ((flags & ENSURECOPY) || PyArray_EquivTypes(oldtype, newtype)) {
arrflags = arr->flags;
copy = (flags & ENSURECOPY) || \