8000 Merge pull request #5105 from juliantaylor/where-no-subtype · numpy/numpy@f8a1f66 · GitHub
[go: up one dir, main page]

Skip to content

Commit f8a1f66

Browse files
committed
Merge pull request #5105 from juliantaylor/where-no-subtype
BUG: don't propagate subtypes from np.where
2 parents 38ed773 + 8dd2e47 commit f8a1f66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/core/src/multiarray/multiarraymodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2790,7 +2790,7 @@ PyArray_Where(PyObject *condition, PyObject *x, PyObject *y)
27902790
NULL, arr, ax, ay
27912791
};
27922792
npy_uint32 op_flags[4] = {
2793-
NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE,
2793+
NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE | NPY_ITER_NO_SUBTYPE,
27942794
NPY_ITER_READONLY, NPY_ITER_READONLY, NPY_ITER_READONLY
27952795
};
27962796
PyArray_Descr * common_dt = PyArray_ResultType(2, &op_in[0] + 2,

0 commit comments

Comments
 (0)
0