From 95e9bfaba04064530899b8ba78cddec2ff505b4c Mon Sep 17 00:00:00 2001 From: Allan Haldane Date: Sun, 2 Jul 2017 14:01:49 -0400 Subject: ENH: Simplify some code in arrayprint.py --- numpy/core/tests/test_arrayprint.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'numpy/core/tests') diff --git a/numpy/core/tests/test_arrayprint.py b/numpy/core/tests/test_arrayprint.py index ffa939633..90ba79f30 100644 --- a/numpy/core/tests/test_arrayprint.py +++ b/numpy/core/tests/test_arrayprint.py @@ -287,12 +287,16 @@ class TestPrintOptions(object): np.set_printoptions(sign=' ') assert_equal(repr(a), 'array([ 0., 1., 2., 3.])') - assert_equal(repr(np.array(1.)), 'array(1.)') + assert_equal(repr(np.array(1.)), 'array( 1.)') np.set_printoptions(sign='+') assert_equal(repr(a), 'array([+0., +1., +2., +3.])') assert_equal(repr(np.array(1.)), 'array(+1.)') + np.set_printoptions(sign='legacy') + assert_equal(repr(a), 'array([ 0., 1., 2., 3.])') + assert_equal(repr(np.array(1.)), 'array(1.)') + def test_unicode_object_array(): import sys -- cgit v1.2.1