summaryrefslogtreecommitdiff
path: root/numpy/lib/src/_compiled_base.c
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2009-06-03 02:50:47 +0000
committerCharles Harris <charlesr.harris@gmail.com>2009-06-03 02:50:47 +0000
commiteb214ee1b5c178eddee35d83191d767f0a59eaab (patch)
treef9936364e174ea0582249dc544059a957065f202 /numpy/lib/src/_compiled_base.c
parenta6d3b8770ca9684ed342e7a4cf7d7af96a2bae1d (diff)
downloadnumpy-eb214ee1b5c178eddee35d83191d767f0a59eaab.tar.gz
Replace ValueError by TypeError in appropriate places.
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;
}