Expand description
A module contains shape utilities
Functions§
- compare_
and_ pad_ shapes - pad shape to the shortter one, this is used for prepareing for matmul broadcast.
- compare_
and_ pad_ shapes_ strides - pad shape and strides to the shortter one, this is used for prepareing for matmul broadcast.
- get_
broadcast_ axes_ from - Determines the axes along which broadcasting is required to match a desired result shape.
- is_
reshape_ possible - Attempt to reshape an array without copying data. Translated from NumPy’s _attempt_nocopy_reshape function.
- mt_
intervals - Generates intervals for multi-threaded processing by dividing the outer loop into chunks.
- mt_
intervals_ simd - Generates intervals for multi-threaded SIMD processing by dividing the outer loop into chunks.
- predict_
broadcast_ shape - Predicts the broadcasted shape resulting from broadcasting two arrays.
- try_
pad_ shape - Pads a shape with ones on the left to reach a specified length.
- yield_
one_ after - Inserts a
1into a shape vector immediately after a specified index. - yield_
one_ before - Inserts a dimension of size 1 before the specified index in a shape.