diff options
| author | Matthew Brett <matthew.brett@gmail.com> | 2012-09-13 15:21:10 +0100 |
|---|---|---|
| committer | Matthew Brett <matthew.brett@gmail.com> | 2012-09-16 12:51:53 +0100 |
| commit | 4475eadaa879cdc82f5331abc22ab47b99e6b040 (patch) | |
| tree | d53ee863210e6bde93017a1992e79f3090187a5d /numpy | |
| parent | 21a1d73627992d4d904150a0056ae8d55af6f1b5 (diff) | |
| download | numpy-4475eadaa879cdc82f5331abc22ab47b99e6b040.tar.gz | |
BUG: change FutureWarning to DeprecationWarning
Use of PyErr_WarnEx causing failure for Python 2.4.
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/src/multiarray/multiarraymodule.c | 8 | ||||
| -rw-r--r-- | numpy/core/tests/test_shape_base.py | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c index 3241a02c7..9814a9f65 100644 --- a/numpy/core/src/multiarray/multiarraymodule.c +++ b/numpy/core/src/multiarray/multiarraymodule.c @@ -339,9 +339,11 @@ PyArray_ConcatenateArrays(int narrays, PyArrayObject **arrays, int axis) } if (ndim == 1 & axis != 0) { - PyErr_WarnEx(PyExc_FutureWarning, - "axis not 0 for ndim == 0; this will raise an error " - "in future versions of numpy", 2); + char msg[] = "axis != 0 for ndim == 1; this will raise an error in " + "future versions of numpy"; + if (DEPRECATE(msg) < 0) { + return NULL; + } axis = 0; } diff --git a/numpy/core/tests/test_shape_base.py b/numpy/core/tests/test_shape_base.py index 0325d4a2c..72828271b 100644 --- a/numpy/core/tests/test_shape_base.py +++ b/numpy/core/tests/test_shape_base.py @@ -212,7 +212,7 @@ def test_concatenate_sloppy0(): r4 = list(range(4)) r3 = list(range(3)) assert_array_equal(concatenate((r4, r3), 0), r4 + r3) - warnings.simplefilter('ignore', FutureWarning) + warnings.simplefilter('ignore', DeprecationWarning) try: assert_array_equal(concatenate((r4, r3), -10), r4 + r3) assert_array_equal(concatenate((r4, r3), 10), r4 + r3) |
