diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-10-13 19:09:04 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-10-13 19:09:04 +0000 |
commit | bee75459472c7fdfdbf08d0caa390342c447c49d (patch) | |
tree | f5150164ef9ecb36adf94dd54ed24182ae8da5d4 /numpy | |
parent | 81abf6377654cb96ee6e2dbe568de0ea5d4f4af1 (diff) | |
download | numpy-bee75459472c7fdfdbf08d0caa390342c447c49d.tar.gz |
Fix ticket #341: part with 'c' arrays not being comparable to strings.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/include/numpy/ndarrayobject.h | 6 | ||||
-rw-r--r-- | numpy/core/src/arrayobject.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/include/numpy/ndarrayobject.h b/numpy/core/include/numpy/ndarrayobject.h index f2e33e8df..4ff0a5a17 100644 --- a/numpy/core/include/numpy/ndarrayobject.h +++ b/numpy/core/include/numpy/ndarrayobject.h @@ -1593,10 +1593,10 @@ typedef struct { #define PyTypeNum_ISNUMBER(type) (type <= NPY_CLONGDOUBLE) -#define PyTypeNum_ISSTRING(type) ((type == NPY_STRING) || \ - (type == NPY_UNICODE)) +#define PyTypeNum_ISSTRING(type) ((type == NPY_STRING) || \ + (type == NPY_UNICODE)) -#define PyTypeNum_ISCOMPLEX(type) ((type >= NPY_CFLOAT) && \ +#define PyTypeNum_ISCOMPLEX(type) ((type >= NPY_CFLOAT) && \ (type <= NPY_CLONGDOUBLE)) #define PyTypeNum_ISPYTHON(type) ((type == NPY_LONG) || \ diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index fa947ecbb..e03b47085 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -4445,7 +4445,7 @@ _strings_richcompare(PyArrayObject *self, PyArrayObject *other, int cmp_op, int val; /* Cast arrays to a common type */ - if (self->descr->type != other->descr->type) { + if (self->descr->type_num != other->descr->type_num) { PyObject *new; if (self->descr->type_num == PyArray_STRING && \ other->descr->type_num == PyArray_UNICODE) { |