Indexing#
Like NumPy, Aesara distinguishes between basic and advanced indexing. Aesara fully supports basic indexing (see NumPy’s indexing) and integer advanced indexing.
Index-assignment is not supported. If you want to do something like a[5]
= b
or a[5]+=b
, see aesara.tensor.subtensor.set_subtensor()
and
aesara.tensor.subtensor.inc_subtensor()
below.
Generating index tensors#
if cond then ift else iff Generalizes a scalar |
|
Create a dense n-dimensional 'meshgrid' with equally spaced points. |
|
|
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 for the lower-triangle of arr. |
|
Return the indices for the lower-triangle of an (n, m) array. |
|
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 set of arrays to choose from. |
|
Return selected slices of an array along given axis. |
|
A helper function for two ops: |
|
A helper function for |
Inserting data into tensors#
|
Return x with the given subtensor overwritten by y. |
|
Update the value of an indexed array by a given amount. |