summaryrefslogtreecommitdiff
path: root/numpy/lib/src/_compiled_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/src/_compiled_base.c')
-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 16b30608b..5ffedcf59 100644
--- a/numpy/lib/src/_compiled_base.c
+++ b/numpy/lib/src/_compiled_base.c
@@ -732,13 +732,13 @@ pack_or_unpack_bits(PyObject *input, int axis, int unpack)
}
if (unpack) {
if (PyArray_TYPE(inp) != NPY_UBYTE) {
- PyErr_SetString(PyExc_ValueError,
+ PyErr_SetString(PyExc_TypeError,
"Expected an input array of unsigned byte data type");
goto fail;
}
}
else if (!PyArray_ISINTEGER(inp)) {
- PyErr_SetString(PyExc_ValueError,
+ PyErr_SetString(PyExc_TypeError,
"Expected an input array of integer data type");
goto fail;
}