Skip to content

Commit 1b3d793

Browse files
authored
🏷️ add acceptance tests for 2D arrays (#275)
1 parent 1b45197 commit 1b3d793

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/runtime/accept/shape.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ class XYGrid(NamedTuple):
1212
# Test variance of _ShapeType_co
1313
def accepts_2d(a: np.ndarray[tuple[int, int], Any]) -> None:
1414
return None
15+
16+
17+
accepts_2d(np.empty(XYGrid(2, 2)))
18+
accepts_2d(np.zeros(XYGrid(2, 2), dtype=int))
19+
accepts_2d(np.ones(XYGrid(2, 2), dtype=int))
20+
accepts_2d(np.full(XYGrid(2, 2), fill_value=5, dtype=int))

0 commit comments

Comments
 (0)