aesara.tensor.triu_indices#
- aesara.tensor.triu_indices(n: Union[int, ScalarVariable], k: Union[int, ScalarVariable] = 0, m: Optional[Union[int, ScalarVariable]] = None) Tuple[TensorVariable, TensorVariable][source]#
Return the indices for the upper-triangle of an (n, m) array.
- Parameters:
n (integer scalar) – The row dimension of the arrays for which the returned indices will be valid.
k (integer scalar, optional) – Diagonal offset to use when forming the indices.
k = 0(the default) is the main diagonal,k < 0is below it andk > 0is above.m (int scalar, optional) – The column dimension of the arrays for which the returned arrays will be valid. By default m is taken equal to n.
- Returns:
inds – The indices for the triangle. The returned tuple contains two arrays, each with the indices along one dimension of the array.
- Return type:
tuple of TensorVariable’s