From eb214ee1b5c178eddee35d83191d767f0a59eaab Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Wed, 3 Jun 2009 02:50:47 +0000 Subject: Replace ValueError by TypeError in appropriate places. --- numpy/lib/src/_compiled_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/lib/src/_compiled_base.c') 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; } -- cgit v1.2.1