Skip to content

Commit

Permalink
Fix for non-JAX installations.
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-kidger committed May 11, 2023
1 parent 7934d2a commit 0c596ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion jaxtyping/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ class ArrayLike:
Int32 as Int32,
Int64 as Int64,
Integer as Integer,
Key as Key,
Num as Num,
Shaped as Shaped,
UInt as UInt,
Expand All @@ -125,6 +124,9 @@ class ArrayLike:
UInt64 as UInt64,
)

if has_jax:
from .array_types import Key as Key


# Now import PyTree
if typing.TYPE_CHECKING:
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.17"
version = "0.2.18"
description = "Type annotations and runtime checking for shape and dtype of JAX arrays, and PyTrees."
readme = "README.md"
requires-python ="~=3.8"
Expand Down

0 comments on commit 0c596ff

Please sign in to comment.