diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2018-01-11 22:15:01 -0800 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2018-02-15 00:53:20 -0800 |
commit | 7a3344a461fdb25c55cd5e4fa52abda895f01e20 (patch) | |
tree | ff2d9a32f57f9cb180f573de6c28e8599e691de2 /numpy/core/tests | |
parent | a30b29466087997255737bd2ae04ede0c4f71448 (diff) | |
download | python-numpy-7a3344a461fdb25c55cd5e4fa52abda895f01e20.tar.gz python-numpy-7a3344a461fdb25c55cd5e4fa52abda895f01e20.tar.bz2 python-numpy-7a3344a461fdb25c55cd5e4fa52abda895f01e20.zip |
BUG: Fix crash on non-void structured array repr
Fixes gh-9821
Diffstat (limited to 'numpy/core/tests')
-rw-r--r-- | numpy/core/tests/test_multiarray.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py index d80eaf8d5..f17fa573e 100644 --- a/numpy/core/tests/test_multiarray.py +++ b/numpy/core/tests/test_multiarray.py @@ -483,6 +483,10 @@ class TestDtypedescr(object): dt_int = np.dtype(('i4', fields)) assert_equal(str(dt_int), "(numpy.int32, [('a', '<i2'), ('b', '<i2')])") + # gh-9821 + arr_int = np.zeros(4, dt_int) + assert_equal(repr(arr_int), "array([0, 0, 0, 0])") + class TestZeroRank(object): def setup(self): |