Tensordot implementation
Tensordot implementation Issue #1517
Adds a full implementation of tensordot for n-dimensional arrays,
supporting both numeric and paired axis specifications via the new
AxisSpec enum. The design mirrors NumPy’s tensordot behaviour while
integrating cleanly with ndarray’s trait-based approach for the dot
product and existing shape and stride logic.
All internal reshaping and permutation operations use unwrap and
expect with explicit safety reasoning: each call is guarded by
dimension and axis validation, ensuring panics can only occur under
invalid AxisSpec input. Documentation and inline comments
describe these invariants and the exact failure conditions.
Includes tests verifying correct contraction for both paired and integer axis modes.