mirror of
https://github.com/ROCm/jax.git
synced 2025-04-25 00:56:04 +00:00

This change makes ndarray a bit easier for tooling to handle, since de-facto all these methods are supposed to return *something*, but the type inferrable from their default implementations is None. As a hand-wavy aside, in a type stub def f(): ... could be treated equivalently to def f() -> Any: ... because there is no body to infer return type from, and Any is a reasonable fallback type. In a .py file, however, f is no longer just a function *type* (as opposed to function *implementation*), and thus it has an inferrable return type.