Type annotations and runtime checking for shape and dtype of JAX/NumPy/PyTorch/etc. arrays. https://docs.kidger.site/jaxtyping/
jaxtyping.{PRNGKeyArray,Scalar,ScalarLike}
Image = Float[Array, "channels height width"]
BatchImage = Float[Image, "batch"]
^key<\w+>$
),Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.15...v0.2.19
(Yanked; broke the pytest hook. Prefer v0.2.19 instead.)
Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.15...v0.2.18
(Yanked; had incompatibility with non-JAX installations. Prefer v0.2.19 instead.)
Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.15...v0.2.17
(Yanked; had static typing issues. Prefer v0.2.19 instead.)
Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.15...v0.2.16
torch.compile
. (#71)Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.14...v0.2.15
Highlights
pyright>=1.1.293
errors with jaxtyping.PyTree
. (Thanks @ZacCranko in #66!)Features
install_import_hook(..., typechecker=...)
argument to also accept a string. In particular this means it can be used with beartype's new full checking; this can be enabled by passing typechecker="beartype.beartype(conf=beartype.BeartypeConf(strategy=beartype.BeartypeStrategy.On))"
.issubclass(Float[array_type, ...], array_type)
. (This is what brings compatibility with Plum v2.)Bugfixes
Bool[int, "..."]
should now raise an error.@jaxtyping
fo functions with fn
in their __dict__
should now work.install_import_hook(..., typechecker="beartype.beartype")
should no longer raise a spurious error.install_import_hook(..., typechecker=...)
will no longer wrongly hit the same __pycache__
. (Before this the change in value was ignored.)Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.13...v0.2.14
Added support for jax.typing.ArrayLike
.
Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.12...v0.2.13
Autogenerated release notes as follows:
Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.11...v0.2.12
Autogenerated release notes as follows:
Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.10...v0.2.11
Autogenerated release notes as follows:
Full Changelog: https://github.com/google/jaxtyping/compare/v0.2.9...v0.2.10