array#

Module with utility functions for array-related functions and generating array indices.

Functions

flattenix

Flatten an array and return a tuple of axis indices corresponding to their position along that axis.

get_axis

Return an index (unsigned) from a provided axis integer (signed)

sliceaxisix

Generate tuples containing indices for iteratively slicing a numpy.ndarray along a set of axes.

sqarrayix

Generate lists containing indices for indexing square arrays.

triudix

Generate lists containing indices for indexing upper triangle arrays excluding elements along the diagonal.

triuix

Generate lists containing indices for indexing upper triangle arrays including elements along the diagonal.

xmapix

Generate lists containing indices for cross maps.