Skip to content

Commit 720bea6

Browse files
Proper argument for numpy.reshape (#1425)
`numpy.reshape` not only accepts a tuple of ints, but also a simple int. Besides `(10)` is not a tuple and is identical to `10`, unlike `(10,)`.
1 parent 3678488 commit 720bea6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zarr/tests/test_indexing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,7 @@ def test_set_selections_with_fields():
16321632
),
16331633
(
16341634
(slice(0, 10, 1),),
1635-
np.arange(0, 10).reshape((10)),
1635+
np.arange(0, 10).reshape(10),
16361636
[(0, 10, (slice(0, 10, 1),))],
16371637
),
16381638
((0,), np.arange(0, 100).reshape((10, 10)), [(0, 10, (slice(0, 1, 1),))]),
@@ -1644,7 +1644,7 @@ def test_set_selections_with_fields():
16441644
np.arange(0, 100).reshape((10, 10)),
16451645
[(0, 1, (slice(0, 1, 1), slice(0, 1, 1)))],
16461646
),
1647-
((0,), np.arange(0, 10).reshape((10)), [(0, 1, (slice(0, 1, 1),))]),
1647+
((0,), np.arange(0, 10).reshape(10), [(0, 1, (slice(0, 1, 1),))]),
16481648
pytest.param(
16491649
(slice(5, 8, 1), slice(2, 4, 1), slice(0, 5, 1)),
16501650
np.arange(2, 100002).reshape((10, 1, 10000)),

0 commit comments

Comments
 (0)