From 2635398db3f26529ce2aaea4028a8118844f3c48 Mon Sep 17 00:00:00 2001 From: Mark Wiebe Date: Sun, 6 Feb 2011 15:48:45 -0800 Subject: ENH: core: Add new GetArrayParamsFromObject API function (fixes #1081) This function allows code to query an object's "innate" type and shape, without actually creating a NumPy array out of it. PyArray_FromAny has been changed to use this function, as an assurance that its implementation is correct. This also fixes the known failure in test_regression.py. --- numpy/lib/tests/test_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib') diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 04497dee8..5001f6bac 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -1050,7 +1050,7 @@ M 33 21.99 converters = {4: lambda x:"(%s)" % x} kwargs = dict(delimiter=",", converters=converters, dtype=[(_, int) for _ in 'abcde'],) - assert_raises(TypeError, np.genfromtxt, mdata, **kwargs) + assert_raises(ValueError, np.genfromtxt, mdata, **kwargs) def test_default_field_format(self): -- cgit v1.2.1