diff options
author | Travis Oliphant <oliphant@enthought.com> | 2005-10-05 21:01:55 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2005-10-05 21:01:55 +0000 |
commit | 3d544ba367f3eaf8804c00374f502f33469559e6 (patch) | |
tree | a7b913a1bbe5292f1c643509c4b5ced4bf818112 /scipy/base/src/arrayobject.c | |
parent | 9ce3555349dac29e1ff450d978bf3c0973ebeb45 (diff) | |
download | numpy-3d544ba367f3eaf8804c00374f502f33469559e6.tar.gz |
Fixed some BOOL-related bugs. BOOLs are now cast to their correct type.
Diffstat (limited to 'scipy/base/src/arrayobject.c')
-rw-r--r-- | scipy/base/src/arrayobject.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scipy/base/src/arrayobject.c b/scipy/base/src/arrayobject.c index ae8c48f1d..d839365a7 100644 --- a/scipy/base/src/arrayobject.c +++ b/scipy/base/src/arrayobject.c @@ -4544,7 +4544,12 @@ _array_find_type(PyObject *op, PyArray_Typecode *minitype, goto finish; } - if (PyInt_Check(op)) { + if (PyBool_Check(op)) { + chktype = PyArray_BOOL; + chksize = sizeof(Bool); + goto finish; + } + else if (PyInt_Check(op)) { chktype = PyArray_LONG; chksize = sizeof(long); goto finish; |