Expand description
Shape rules: one function per concern, all arithmetic checked.
Functions§
- check_
shape - Validates a declared shape against the limits and returns its element count.
- checked_
num_ elements - Product of the dimensions, or
Noneon overflow. Rank 0 gives 1. - elementwise_
shape - The subset of
numpy_broadcastthat v1 accepts: equal shapes, or one operand that is a scalar. Widening this is a change to this one function. - infer
- Infers the output type of
opapplied toinputs, checking arity first. - numpy_
broadcast - The general NumPy broadcasting rule: align trailing dimensions; a dimension of 1 or a missing dimension stretches to the other operand’s.