API Reference¶
This section is intentionally organized by import boundary, not by internal implementation file.
Modules¶
| Module | What it exports |
|---|---|
bearshape |
Dimensions, structures, dtype specs, factories and memo helpers |
bearshape.numpy |
NumPy arrays, Like and ScalarLike aliases, Structured and ArrayLike |
bearshape.jax |
JAX arrays, Like aliases, ScalarLike re-exports and Tree |
bearshape.torch |
Torch arrays, Like aliases and ScalarLike re-exports |
bearshape.cupy |
CuPy arrays, Like aliases and ScalarLike re-exports |
bearshape.optree |
Explicit Tree backend and Structure |
bearshape.claw |
Caller-preserving alias of beartype_this_package |
Important boundaries¶
- The root
bearshapeimport is optional-dependency-safe and does not require NumPy. Treeis not exported from the root module. Import it frombearshape.optreeorbearshape.jax.make_scalar_like_typeis not exported from the root module. Import it frombearshape.numpyor a backend module that re-exports it.