aesara.tensor.tri#
- aesara.tensor.tri(N, M=None, k=0, dtype=None)[source]#
An array with ones at and below the given diagonal and zeros elsewhere.
- Parameters:
N (int) – Number of rows in the array.
M (int, optional) – Number of columns in the array. By default,
Mis taken equal toN.k (int, optional) – The sub-diagonal at and below which the array is filled.
k= 0 is the main diagonal, whilek< 0 is below it, andk> 0 is above. The default is 0.dtype (dtype, optional) – Data type of the returned array. The default is float.
- Returns:
Array with its lower triangle filled with ones and zero elsewhere; in other words
T[i,j] == 1fori <= j + k, 0 otherwise.- Return type:
Array of shape (N, M)