8000 TST: cbook reshape2d empty list · matplotlib/matplotlib@a00e4d8 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit a00e4d8

Browse files
committed
TST: cbook reshape2d empty list
1 parent 3376142 commit a00e4d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/tests/test_cbook.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,11 @@ def test_flatiter():
497497
def test_reshape2d():
498498
class dummy():
499499
pass
500+
xnew = cbook._reshape_2D([], 'x')
501+
assert np.shape(xnew) == (1, 0)
502+
500503
x = [dummy() for j in range(5)]
504+
501505
xnew = cbook._reshape_2D(x, 'x')
502506
assert np.shape(xnew) == (1, 5)
503507

0 commit comments

Comments
 (0)
0