@@ -87,7 +87,7 @@ def dtype_arg(request: pytest.FixtureRequest) -> type[DTypeOut] | None:
8787
8888@pytest .fixture
8989def np_arr (dtype_in : type [DTypeIn ], ndim : Literal [1 , 2 ]) -> NDArray [DTypeIn ]:
90- np_arr = np .array ([[1 , 2 , 3 ], [4 , 5 , 6 ]], dtype = dtype_in )
90+ np_arr = cast ( "NDArray[DTypeIn]" , np .array ([[1 , 2 , 3 ], [4 , 5 , 6 ]], dtype = dtype_in ) )
9191 np_arr .flags .writeable = False
9292 if ndim == 1 :
9393 np_arr = np_arr .flatten ()
@@ -149,7 +149,7 @@ def test_mean(
149149 }[None ]
150150 if array_type in ATS_CUPY_SPARSE and np_arr .dtype .kind != "f" :
151151 pytest .skip ("CuPy sparse matrices only support floats" )
152- np .testing .assert_array_equal (np .mean (np_arr , axis = axis ), expected )
152+ np .testing .assert_array_equal (np .mean (np_arr , axis = axis ), expected ) # type: ignore[arg-type]
153153
154154 arr = array_type (np_arr )
155155 result = stats .mean (arr , axis = axis ) # type: ignore[arg-type] # https://github.com/python/mypy/issues/16777
@@ -172,8 +172,8 @@ def test_mean_var(
172172 var_expected : float | list [float ],
173173 np_arr : NDArray [DTypeIn ],
174174) -> None :
175- np .testing .assert_array_equal (np .mean (np_arr , axis = axis ), mean_expected )
176- np .testing .assert_array_equal (np .var (np_arr , axis = axis , correction = 1 ), var_expected )
175+ np .testing .assert_array_equal (np .mean (np_arr , axis = axis ), mean_expected ) # type: ignore[arg-type]
176+ np .testing .assert_array_equal (np .var (np_arr , axis = axis , correction = 1 ), var_expected ) # type: ignore[arg-type]
177177
178178 arr = array_type (np_arr )
179179 mean , var = stats .mean_var (arr , axis = axis , correction = 1 )
0 commit comments