Skip to content

Commit

Permalink
Fixes #188.
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-kidger committed Mar 7, 2024
1 parent f708d17 commit 102e499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion jaxtyping/_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ def f(...): ...
"""

global _tb_flag
if _tb_flag and importlib.util.find_spec("jax._src.traceback_util") is not None:
if (
_tb_flag
and importlib.util.find_spec("jax") is not None
and importlib.util.find_spec("jax._src.traceback_util") is not None
):
import jax._src.traceback_util as traceback_util

traceback_util.register_exclusion(__file__)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "jaxtyping"
version = "0.2.27"
version = "0.2.28"
description = "Type annotations and runtime checking for shape and dtype of JAX arrays, and PyTrees."
readme = "README.md"
requires-python ="~=3.9"
Expand Down

0 comments on commit 102e499

Please sign in to comment.