chickadee » numchi » array-diagonal

array-diagonal a #!key (offset 0) (axis1 0) (axis2 1)procedure

Return diagonals of a as a shared array. Unaffected by array-default-copy. Currently only works on specialized arrays.

NOTE: Part of the implementation of this procedure is based on NumPy's C sources (translated to scheme), and is pretty gross if not inefficient.

Similar: ndarray.diagonal

DIFF: Offsets must be within a's bounds, since SRFI-179 does not support zero sized arrays/dimensions.