summaryrefslogtreecommitdiff
path: root/numpy/lib/src
diff options
context:
space:
mode:
authorLars Buitinck <larsmans@gmail.com>2014-11-30 22:20:24 +0100
committerLars Buitinck <larsmans@gmail.com>2014-11-30 22:20:24 +0100
commit24effb6b7a075e23d85ea0b60ed8a607fe218c14 (patch)
tree975ff344e21ca66b1834adcdf096cc56dfab7536 /numpy/lib/src
parent6ce98831797729d7fb8aa525ddda017aceffa5e3 (diff)
downloadnumpy-24effb6b7a075e23d85ea0b60ed8a607fe218c14.tar.gz
ENH ensure np.packbits works on np.bool dtype
Diffstat (limited to 'numpy/lib/src')
-rw-r--r--numpy/lib/src/_compiled_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/src/_compiled_base.c b/numpy/lib/src/_compiled_base.c
index 0cf034fca..99aec38f0 100644
--- a/numpy/lib/src/_compiled_base.c
+++ b/numpy/lib/src/_compiled_base.c
@@ -1376,9 +1376,9 @@ pack_bits(PyObject *input, int axis)
if (inp == NULL) {
return NULL;
}
- if (!PyArray_ISINTEGER(inp)) {
+ if (!PyArray_ISBOOL(inp) && !PyArray_ISINTEGER(inp)) {
PyErr_SetString(PyExc_TypeError,
- "Expected an input array of integer data type");
+ "Expected an input array of integer or boolean data type");
goto fail;
}