Add int4/uint4 support in jaxtyping. (#174)

* Add int4/uint4 support in jaxtyping.

* Fix a typo and update api docs.
This commit is contained in:
jianlijianli
2024-02-25 12:07:01 +00:00
committed by Patrick Kidger
parent 1d4d40294c
commit 9beb5f2d29
5 changed files with 18 additions and 4 deletions
+2 -2
View File
@@ -66,9 +66,9 @@ The dtype should be any one of (all imported from `jaxtyping`):
- Of particular precision: `Complex64`, `Complex128`
- Any integer or unsigned intger: `Integer`
- Any unsigned integer: `UInt`
- Of particular precision: `UInt8`, `UInt16`, `UInt32`, `UInt64`
- Of particular precision: `UInt4`, `UInt8`, `UInt16`, `UInt32`, `UInt64`
- Any signed integer: `Int`
- Of particular precision: `Int8`, `Int16`, `Int32`, `Int64`
- Of particular precision: `Int4`, `Int8`, `Int16`, `Int32`, `Int64`
- Any floating, integer, or unsigned integer: `Real`.
Unless you really want to force a particular precision, then for most applications you should probably allow any floating-point, any integer, etc. That is, use