Skip to content

Commit 1560df9

Browse files
authored
⚰️ remove unnecessary cast (#272)
1 parent fb845e0 commit 1560df9

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

test/runtime/accept/shape.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, NamedTuple, cast
1+
from typing import Any, NamedTuple
22

33
import numpy as np
44

@@ -9,16 +9,6 @@ class XYGrid(NamedTuple):
99
y_axis: int
1010

1111

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-
1912
# Test variance of _ShapeType_co
2013
def accepts_2d(a: np.ndarray[tuple[int, int], Any]) -> None:
2114
return None
22-
23-
24-
accepts_2d(arr)

0 commit comments

Comments
 (0)