Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def matrix_multiply(x: Float[Tensor, "dim1 dim2"],
pip install jaxtyping
```

Requires Python 3.10+.
Requires Python 3.11+.

The annotations provided by jaxtyping are compatible with runtime type-checking packages, so it is common to also install one of these. The two most popular are [typeguard](https://github.com/agronholm/typeguard) (which exhaustively checks every argument) and [beartype](https://github.com/beartype/beartype) (which checks random pieces of arguments).

Expand Down
2 changes: 1 addition & 1 deletion docs/api/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ As `jaxtyping` originally got its start as a JAX-specific library, then we provi
- `jaxtyping.Scalar`: alias for `jaxtyping.Shaped[jax.Array, ""]`
- `jaxtyping.ScalarLike`: alias for `jaxtyping.Shaped[jax.typing.ArrayLike, ""]`
- `jaxtyping.Key`, which is the dtype of `jax.random.key`s. For example `jax.random.key(...)` produces a `jaxtyping.Key[jax.Array, ""]`.
- `jaxtyping.PRNGKeyArray`: alias for `jaxtyping.Key[jax.Array, ""] | jaxtyping.UInt32[jax.Array, "2"]` (Left: new-style typed keys; right: old-style keys. See [JEP 9263](https://docs.jax.dev/en/latest/jep/9263-typed-keys.html).)
- `jaxtyping.PRNGKeyArray`: alias for `jaxtyping.Key[jax.Array, ""] | jaxtyping.UInt32[jax.Array, "2"] | jaxtyping.UInt32[jax.Array, "4"]` (Left: new-style typed keys; right: old-style raw keys, which have four `uint32`s for the `rbg`/`unsafe_rbg` implementations and two otherwise. See [JEP 9263](https://docs.jax.dev/en/latest/jep/9263-typed-keys.html).)

Recalling that shape-and-dtype specified jaxtyping arrays can be nested, this means that e.g. you can annotate the output of `jax.random.split` with `Shaped[PRNGKeyArray, "2"]`.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def matrix_multiply(x: Float[Tensor, "dim1 dim2"],
pip install jaxtyping
```

Requires Python 3.10+.
Requires Python 3.11+.

The annotations provided by jaxtyping are compatible with runtime type-checking packages, so it is common to also install one of these. The two most popular are [typeguard](https://github.com/agronholm/typeguard) (which exhaustively checks every argument) and [beartype](https://github.com/beartype/beartype) (which checks random pieces of arguments).

Expand Down