Replies: 1 comment
-
|
If we are looking for the best reproducibility, and also if we are interfacing with compiled C or C++ that uses |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using mypy with NumPy 2.x, stricter type definitions are necessary. For example, functions that return an array from
np.linspaceoften produce anNDArraywith dtypenp.floating[Any]. This becomes an issue when the function signature specifies a return type like-> npt.NDArray[np.float64], as it causes a type error.Should we relax the type hint to allow any floating-point type (e.g., converting everything to
np.floating[Any]or using a defined alias), or should we enforce strict adherence tonp.float64?Beta Was this translation helpful? Give feedback.
All reactions