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
{{ message }}
This repository was archived by the owner on Jun 10, 2020. It is now read-only.
The following code works but doesn't pass type checking:
x = None # type: Optional[np.ndarray]
x = np.float32([1.0, 0.0, 0.0])
assert isinstance(x, np.ndarray)
But I don't know if this can be expressed in mypy - when I tried adding @overload def __new__(cls, x: List[float]) -> ndarray: ..., mypy now accepted the arguments but ignored the return type and assumed this produces an np.float32.