Shapes, types, and indexing

JAX-SHAPE-001

Shape polymorphism could not prove a symbolic comparison or constraint. Identify the compared dimension expressions and determine whether the relation holds across the whole declared shape family. Rewrite the expression, specify a valid symbolic constraint, or use a narrower export signature. Verify with multiple admissible concrete sizes and an input outside the contract.

JAX shape polymorphism

JAX-SHAPE-002

Record the shape and meaning of each axis at the failing operation with jax.eval_shape or a small reproducer. Check batch alignment, trailing-axis broadcasting, contraction axes and reshape element counts. Verify with unequal axis sizes to expose accidental transposes that square inputs conceal.

JAX rank promotion

JAX-TYPE-001

Find the operation rejecting the type and inspect the operand dtypes, Python scalar weak typing, the X64 setting and the expected signatures. Convert at the intended boundary with an explicit dtype and verify the original computation under the same precision policy. For a specific tracer conversion, use the corresponding tracing route.

JAX type promotion

JAX-INDEX-001

Inspect operand rank, index dtype and shape, traced slice bounds, and required out-of-bounds semantics. Choose an indexing operation that supports the actual index type and has a statically known output shape. Verify boundary indices explicitly. Some JAX gathers and updates handle out-of-bounds indices without raising.

JAX indexing sharp bits