diff options
author | Allan Haldane <allan.haldane@gmail.com> | 2017-06-30 15:12:39 -0400 |
---|---|---|
committer | Allan Haldane <allan.haldane@gmail.com> | 2017-09-25 21:22:13 -0400 |
commit | b2d709a9630fcd83153aa7df17454d38a8c75534 (patch) | |
tree | 0389fc342babd8856a62d0e6ce7370daf9232b62 /numpy/core/tests | |
parent | 3eed3a26bef80c0bd5ae380337358b7a55bde8de (diff) | |
download | numpy-b2d709a9630fcd83153aa7df17454d38a8c75534.tar.gz |
ENH: "pad_sign" option, also threshold and edgeitems
Diffstat (limited to 'numpy/core/tests')
-rw-r--r-- | numpy/core/tests/test_arrayprint.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/core/tests/test_arrayprint.py b/numpy/core/tests/test_arrayprint.py index 7ff2efce9..ffa939633 100644 --- a/numpy/core/tests/test_arrayprint.py +++ b/numpy/core/tests/test_arrayprint.py @@ -280,6 +280,19 @@ class TestPrintOptions(object): assert_equal(repr(np.array(False)), 'array(False, dtype=bool)') + def test_sign_spacing(self): + a = np.arange(4.) + assert_equal(repr(a), 'array([0., 1., 2., 3.])') + 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='+') + assert_equal(repr(a), 'array([+0., +1., +2., +3.])') + assert_equal(repr(np.array(1.)), 'array(+1.)') + def test_unicode_object_array(): import sys |