Skip to content

Commit 301be08

Browse files
Proper argument for numpy.reshape
`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 13cdbff commit 301be08

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
@@ -1666,7 +1666,7 @@ def test_set_selections_with_fields():
16661666
),
16671667
(
16681668
(slice(0, 10, 1),),
1669-
np.arange(0, 10).reshape((10)),
1669+
np.arange(0, 10).reshape(10),
16701670
[(0, 10, (slice(0, 10, 1),))],
16711671
),
16721672
((0,), np.arange(0, 100).reshape((10, 10)), [(0, 10, (slice(0, 1, 1),))]),
@@ -1678,7 +1678,7 @@ def test_set_selections_with_fields():
16781678
np.arange(0, 100).reshape((10, 10)),
16791679
[(0, 1, (slice(0, 1, 1), slice(0, 1, 1)))],
16801680
),
1681-
((0,), np.arange(0, 10).reshape((10)), [(0, 1, (slice(0, 1, 1),))]),
1681+
((0,), np.arange(0, 10).reshape(10), [(0, 1, (slice(0, 1, 1),))]),
16821682
pytest.param(
16831683
(slice(5, 8, 1), slice(2, 4, 1), slice(0, 5, 1)),
16841684
np.arange(2, 100002).reshape((10, 1, 10000)),

0 commit comments

Comments
 (0)