API Reference¶
This section is intentionally organized by import boundary, not by internal implementation file.
Modules¶
| Module | What it exports |
|---|---|
shapix |
Lightweight root API: dimension symbols, structure symbols, DtypeSpec, make_array_type, make_array_like_type, check, check_context, and __version__ |
shapix.numpy |
NumPy array aliases, Like aliases, ScalarLike aliases, Structured, ArrayLike, and make_scalar_like_type |
shapix.jax |
JAX array aliases, JAX Like aliases, NumPy ScalarLike re-exports, make_scalar_like_type, Tree, and Structure |
shapix.torch |
PyTorch array aliases, Torch Like aliases, NumPy ScalarLike re-exports, and make_scalar_like_type |
shapix.cupy |
CuPy array aliases, CuPy Like aliases, NumPy ScalarLike re-exports, and make_scalar_like_type |
shapix.optree |
Explicit Tree backend using OpTree plus Structure |
shapix.claw |
Thin wrapper around beartype.claw.beartype_this_package |
Important boundaries¶
- The root
shapiximport is optional-dependency-safe and does not require NumPy. Treeis not exported from the root module. Import it fromshapix.optreeorshapix.jax.make_scalar_like_typeis not exported from the root module. Import it fromshapix.numpyor a backend module that re-exports it.