diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2008-07-16 20:23:29 +0000 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2008-07-16 20:23:29 +0000 |
commit | f48abc5a5b88e22dbbad44b1cb130543231ffa13 (patch) | |
tree | a2cef6d2b7aaac00ca4f8ec58fa0244056a7e0ea /numpy/core/src/arrayobject.c | |
parent | a98f7c8be521ea58a3c9c44729bcd162f01a7f0f (diff) | |
download | numpy-f48abc5a5b88e22dbbad44b1cb130543231ffa13.tar.gz |
Fix ticket #850. Thanks to Michael Abbott for the patch.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 9ea986297..d1074a887 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -4717,24 +4717,24 @@ _strings_richcompare(PyArrayObject *self, PyArrayObject *other, int cmp_op, PyObject *new; if (self->descr->type_num == PyArray_STRING && \ other->descr->type_num == PyArray_UNICODE) { - Py_INCREF(other); Py_INCREF(other->descr); new = PyArray_FromAny((PyObject *)self, other->descr, 0, 0, 0, NULL); if (new == NULL) { return NULL; } + Py_INCREF(other); self = (PyArrayObject *)new; } else if (self->descr->type_num == PyArray_UNICODE && \ other->descr->type_num == PyArray_STRING) { - Py_INCREF(self); Py_INCREF(self->descr); new = PyArray_FromAny((PyObject *)other, self->descr, 0, 0, 0, NULL); if (new == NULL) { return NULL; } + Py_INCREF(self); other = (PyArrayObject *)new; } else { |