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
Pyright (and python) infer np.dtype (and other sub-classes of np._ArrayOrScalarCommon) as not Hashable as they overwrite __eq__ without overwriting __hash__.
error: Argument of type"dtype[Unknown]" cannot be assigned to parameter "x" of type"Hashable"infunction"test""dtype[Unknown]" is incompatible with protocol "Hashable""__hash__" is an incompatible type
Type "None" cannot be assigned to type"(self: dtype[Unknown]) -> int" (reportGeneralTypeIssues)
Describe the issue:
Pyright (and python) infer np.dtype (and other sub-classes of np._ArrayOrScalarCommon) as not Hashable as they overwrite
__eq__
without overwriting__hash__
.xref microsoft/pyright#5878
Reproduce the code example:
Error message:
Runtime information:
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: