common#
Backend infrastructure: numpy/jax dispatch, array predicates, scans/maps, shared mixins.
get_backend(is_uniform, use_jax) -> (xnp, xmap, xscan) selects the array module and loop
machinery; is_ndarray/is_jax_ndarray/tree_contains_jax are the type-inference
predicates behind the no-use_jax-parameter convention (dispatch is inferred from the input
arrays at the lowest level); ValueHashedMasks is the value-based hash/eq mixin that keeps a
rebuilt-but-identical mask holder on the same jit cache key.
Attributes#
Classes#
Mixin giving uniform-layer mask holders VALUE-based |
Functions#
|
Similar to jax.lax.scan, except for ragged-sized arrays |
|
Similar to jax.lax.scan, except returns numpy arrays instead of jax arrays. |
|
|
|
|
|
|
|
Data-dependent |
|
Concatenate arrays or sequences. |
|
Append slice to array or element to sequence |
|
Prepend slice to array or element to sequence |
|
|
|
Move every array leaf of a pytree (nested tuples/lists of arrays) onto jax, preserving the tree |
Checks if an object can be treated as uniform for the purposes of jax.scan and jax.map. |
|
|
Save a sequence of core-families (each a sequence of arrays) to a |
|
Inverse of |
|
Guard the uniform-mask contract: masks are concrete host (numpy) arrays, never jax tracers. |
|
Boolean prefix indicator: slot |
Module Contents#
- jax_available = False#
- NDArray#
- is_ndarray#
- is_jax_ndarray#
- is_numpy_ndarray#
- to_jax#
- to_numpy#
- jax_scan#
- jax_map#