Back to Numerical Arrays (NumPy)
np.tril_indices_from
Return the indices for the lower-triangle of an (n, m) array.
Syntax
np.tril_indices_from(arr, k?)
Description
Return the indices for the lower-triangle of an (n, m) array. This is a specialized version that gets the shape from an input array.
Parameters
| Name | Description |
|---|---|
| arr | - Input array from which to get shape |
| k(optional) | - Diagonal offset (k=0 is main diagonal, k<0 is below, k>0 is above) |
Returns
Promise<[NDArray, NDArray]>