diff --git a/docs/api/runtime-type-checking.md b/docs/api/runtime-type-checking.md index 36719fb..772ec29 100644 --- a/docs/api/runtime-type-checking.md +++ b/docs/api/runtime-type-checking.md @@ -20,3 +20,15 @@ It can be a lot of effort to add `@jaxtyped` decorators all over your codebase. The easier option is usually to use the import hook. ::: jaxtyping.install_import_hook + +--- + +#### IPython extension + +If you are running in an IPython environment (for example a Jupyter or Colab notebook), then the jaxtyping hook can be automatically ran via a custom magic: +```python +import jaxtyping +%load_ext jaxtyping +%jaxtyping.typechecker beartype.beartype # or any other runtime type checker +``` +Place this at the start of your notebook -- everything that is directly defined in the notebook, after this magic is run, will be hook'd. diff --git a/pyproject.toml b/pyproject.toml index 66a316b..b6def35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "jaxtyping" -version = "0.2.21" +version = "0.2.22" description = "Type annotations and runtime checking for shape and dtype of JAX arrays, and PyTrees." readme = "README.md" requires-python ="~=3.9"