Skip to content

Commit 6373b85

Browse files
committed
MNT: tiny optimization
1 parent 54e3a83 commit 6373b85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/_core/src/multiarray/ctors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1928,7 +1928,7 @@ PyArray_FromArray(PyArrayObject *arr, PyArray_Descr *newtype, int flags)
19281928
if (!copy) {
19291929
npy_intp view_offset;
19301930
npy_intp is_safe = PyArray_SafeCast(oldtype, newtype, &view_offset, NPY_NO_CASTING, 1);
1931-
copy = copy || !(is_safe && (view_offset != NPY_MIN_INTP));
1931+
copy = !(is_safe && (view_offset != NPY_MIN_INTP));
19321932
}
19331933

19341934
if (copy) {

0 commit comments

Comments
 (0)