Skip to content

Commit 7b322c9

Browse files
committed
Fix pyright test issue with numpy.ndarray across multiple versions of Python
1 parent e5a3893 commit 7b322c9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/sklearn/preprocessing_tests.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from typing import Any
21
from typing_extensions import assert_type
32

43
from numpy import ndarray
@@ -15,15 +14,15 @@
1514
assert_type(result, csr_matrix)
1615

1716
result = normalize(matrix, return_norm=True)
18-
assert_type(result, tuple[csr_matrix, ndarray[Any, Any]])
17+
assert_type(result, tuple[csr_matrix, ndarray])
1918

2019
# normalize with array
2120
array_like = [1]
2221
result = normalize(array_like)
23-
assert_type(result, ndarray[Any, Any])
22+
assert_type(result, ndarray)
2423

2524
result = normalize(array_like, return_norm=False)
26-
assert_type(result, ndarray[Any, Any])
25+
assert_type(result, ndarray)
2726

2827
result = normalize(array_like, return_norm=True)
29-
assert_type(result, tuple[ndarray[Any, Any], ndarray[Any, Any]])
28+
assert_type(result, tuple[ndarray, ndarray])

0 commit comments

Comments
 (0)