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 fb845e0 commit 1560df9Copy full SHA for 1560df9
test/runtime/accept/shape.py
@@ -1,4 +1,4 @@
1
-from typing import Any, NamedTuple, cast
+from typing import Any, NamedTuple
2
3
import numpy as np
4
@@ -9,16 +9,6 @@ class XYGrid(NamedTuple):
9
y_axis: int
10
11
12
-# TODO: remove this cast after: https://github.com/numpy/numpy/pull/27171
13
-arr: np.ndarray[XYGrid, Any] = cast(
14
- "np.ndarray[XYGrid, Any]",
15
- np.empty(XYGrid(2, 2)),
16
-)
17
-
18
19
# Test variance of _ShapeType_co
20
def accepts_2d(a: np.ndarray[tuple[int, int], Any]) -> None:
21
return None
22
23
24
-accepts_2d(arr)
0 commit comments