diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-03-03 23:40:17 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-03-03 23:40:17 +0000 |
commit | d5c0229e1ac366b43bc35c9fdbf6d0f102d00539 (patch) | |
tree | 20525b576ae41ff6ea866f1c1a4744e3ad361741 /numpy/core/src/arrayobject.c | |
parent | 07a9750e934ad45f086b73b9f9f114ea4b2fcdd1 (diff) | |
download | numpy-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.c | 2 |
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) || \ |