diff options
author | Jay Bourque <jay.bourque@continuum.io> | 2013-04-01 17:20:47 -0500 |
---|---|---|
committer | Jay Bourque <jay.bourque@continuum.io> | 2013-08-16 16:39:31 -0500 |
commit | e4cbcb2e134bf0241d642149f6da37f5b2b5cf7d (patch) | |
tree | 01785dcfca554fb8af4cf105c9566b1d532edb3f /numpy | |
parent | f9a3e177f8cb08aeac2cccdb1067871c97bbe065 (diff) | |
download | numpy-e4cbcb2e134bf0241d642149f6da37f5b2b5cf7d.tar.gz |
Just create an array object for second operand; don't cast to dtype of first operand.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/umath/ufunc_object.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c index e90262991..901b2ce4e 100644 --- a/numpy/core/src/umath/ufunc_object.c +++ b/numpy/core/src/umath/ufunc_object.c @@ -4902,16 +4902,10 @@ ufunc_at(PyUFuncObject *ufunc, PyObject *args) goto fail; } - /* - * If second operand exists, we need to broadcast it to - * the shape of the indices applied to the first operand. - * This will produce an iterator that will match up with - * the iterator for the first operand. - */ + /* Create second operand from number array if needed. */ if (op2 != NULL) { - iter_descr = PyArray_DESCR(iter->ait->ao); - op2_array = (PyArrayObject *)PyArray_FromAny(op2, iter_descr, - 0, 0, NPY_ARRAY_FORCECAST, NULL); + op2_array = (PyArrayObject *)PyArray_FromAny(op2, NULL, + 0, 0, 0, NULL); if (op2_array == NULL) { goto fail; } |