You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
d:\source\repos\debug_typing.py
d:\source\repos\debug_typing.py:16:5 - error: Argument of type "NDArray[float64]" cannot be assigned to parameter "sample" of type "_Any2D_f" in function "scale"
Type "NDArray[float64]" is not assignable to type "_Any2D_f"
"ndarray[tuple[Literal[10], Literal[10]], dtype[float64]]" is incompatible with protocol "_CanLenArray[floating[Any]]"
"__array__" is an incompatible type
One or more overloads of "__array__" is not assignable
No overloaded function matches type "(dtype: _DT@__array__, /) -> ndarray[_ShapeT_co@__array__, _DT@__array__]"
"ndarray[tuple[Literal[10], Literal[10]], dtype[float64]]" is not assignable to "Sequence[Sequence[float | floating[Any]]]"
"ndarray[tuple[Literal[10], Literal[10]], dtype[float64]]" is not assignable to "Sequence[_Any1D_f]" (reportArgumentType)
1 error, 0 warnings, 0 informations
The text was updated successfully, but these errors were encountered:
The following example type checks with sample being a numpy array without an explicit shape type
but fails to type check with a given shape
numpy 2.1.3
pyright 1.1.388
python 3.12.7
The error returned is
The text was updated successfully, but these errors were encountered: