summaryrefslogtreecommitdiff
path: root/numpy/core/tests
diff options
context:
space:
mode:
authorAllan Haldane <allan.haldane@gmail.com>2017-07-02 14:01:49 -0400
committerAllan Haldane <allan.haldane@gmail.com>2017-09-25 21:22:13 -0400
commit95e9bfaba04064530899b8ba78cddec2ff505b4c (patch)
treeb4a6b152caf5799c6b076c5f6fffa3ebaca3187f /numpy/core/tests
parentb2d709a9630fcd83153aa7df17454d38a8c75534 (diff)
downloadnumpy-95e9bfaba04064530899b8ba78cddec2ff505b4c.tar.gz
ENH: Simplify some code in arrayprint.py
Diffstat (limited to 'numpy/core/tests')
-rw-r--r--numpy/core/tests/test_arrayprint.py6
1 files changed, 5 insertions, 1 deletions
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