summaryrefslogtreecommitdiff
path: root/scipy/base/src/arrayobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-10-05 21:01:55 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-10-05 21:01:55 +0000
commit3d544ba367f3eaf8804c00374f502f33469559e6 (patch)
treea7b913a1bbe5292f1c643509c4b5ced4bf818112 /scipy/base/src/arrayobject.c
parent9ce3555349dac29e1ff450d978bf3c0973ebeb45 (diff)
downloadnumpy-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.c7
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;