Indexing routines#
See also
Generating index arrays#
Translates slice objects to concatenation along the second axis. |
|
Translates slice objects to concatenation along the first axis. |
|
A nicer way to build up index tuples for arrays. |
|
|
Return the indices of the elements that are non-zero. |
|
Return elements chosen from x or y depending on condition. |
|
Return an array representing the indices of a grid. |
|
Construct an open mesh from multiple sequences. |
nd_grid instance which returns an open multi-dimensional "meshgrid". |
|
|
Converts a tuple of index arrays into an array of flat indices, applying boundary modes to the multi-index. |
|
Converts a flat index or array of flat indices into a tuple of coordinate arrays. |
|
Return the indices to access the main diagonal of an array. |
|
Return the indices to access the main diagonal of an n-dimensional array. |
|
Return the indices to access (n, n) arrays, given a masking function. |
|
Return the indices for the lower-triangle of an (n, m) array. |
|
Return the indices for the lower-triangle of arr. |
|
Return the indices for the upper-triangle of an (n, m) array. |
|
Return the indices for the upper-triangle of arr. |
Indexing-like operations#
|
Take elements from an array along an axis. |
|
Take values from the input array by matching 1d index and data slices. |
|
Construct an array from an index array and a list of arrays to choose from. |
|
Return selected slices of an array along given axis. |
|
Extract a diagonal or construct a diagonal array. |
|
Return specified diagonals. |
|
Return an array drawn from elements in choicelist, depending on conditions. |
Create a sliding window view into the array with the given window shape. |
|
|
Create a view into the array with the given shape and strides. |
Inserting data into arrays#
|
Change elements of an array based on conditional and input values. |
|
Replaces specified elements of an array with given values. |
|
Put values into the destination array by matching 1d index and data slices. |
|
Changes elements of an array based on conditional and input values. |
|
Fill the main diagonal of the given array of any dimensionality. |
Iterating over arrays#
|
Efficient multi-dimensional iterator object to iterate over arrays. |
|
Multidimensional index iterator. |
|
An N-dimensional iterator object to index arrays. |
|
Create nditers for use in nested loops |
|
Flat iterator object to iterate over arrays. |
|
Buffered iterator for big arrays. |
|
Check whether or not an object can be iterated over. |