Indexing Routines

The following tables show indexing routines provided by NLCPy.

Generating Index Arrays

nlcpy.diag_indices

Returns the indices to access the main diagonal of an array.

nlcpy.nonzero

Returns the indices of the elements that are non-zero.

nlcpy.where

Returns elements chosen from x or y depending on condition.

Indexing-like Operations

nlcpy.diag

Extracts a diagonal or constructs a diagonal array.

nlcpy.diagonal

Returns specified diagonals.

nlcpy.select

Returns an array drawn from elements in choicelist, depending on conditions.

nlcpy.take

Takes elements from an array along an axis.

Inserting data into arrays

nlcpy.fill_diagonal

Fills the main diagonal of the given array of any dimensionality.