We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b45197 commit 1b3d793Copy full SHA for 1b3d793
test/runtime/accept/shape.py
@@ -12,3 +12,9 @@ class XYGrid(NamedTuple):
12
# Test variance of _ShapeType_co
13
def accepts_2d(a: np.ndarray[tuple[int, int], Any]) -> None:
14
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