diff options
author | Jonathan L Long <jonlong@cs.berkeley.edu> | 2017-05-02 16:09:35 -0700 |
---|---|---|
committer | Jonathan L Long <jonlong@cs.berkeley.edu> | 2017-05-05 18:24:18 -0700 |
commit | 3b372f0b3fc29300552904182f18bd8213a3824e (patch) | |
tree | 4e67dcf4b0c11f6dcbfeaf549b38d9796e1d11a4 /numpy/core | |
parent | 6153a705c3bf30992ff5bd064ff0507ac78300e4 (diff) | |
download | numpy-3b372f0b3fc29300552904182f18bd8213a3824e.tar.gz |
BUG: ndarray.conjugate broken for custom dtypes (unlike np.conjugate)
This is especially relevant to moble's numpy quaternion library, which
will silently fail to conjugate when using ndarray.conjugate.
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/src/multiarray/calculation.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/calculation.c b/numpy/core/src/multiarray/calculation.c index c82c6c46c..be69f0167 100644 --- a/numpy/core/src/multiarray/calculation.c +++ b/numpy/core/src/multiarray/calculation.c @@ -1173,7 +1173,8 @@ PyArray_Clip(PyArrayObject *self, PyObject *min, PyObject *max, PyArrayObject *o NPY_NO_EXPORT PyObject * PyArray_Conjugate(PyArrayObject *self, PyArrayObject *out) { - if (PyArray_ISCOMPLEX(self) || PyArray_ISOBJECT(self)) { + if (PyArray_ISCOMPLEX(self) || PyArray_ISOBJECT(self) || + PyArray_ISUSERDEF(self)) { if (out == NULL) { return PyArray_GenericUnaryFunction(self, n_ops.conjugate); |