vt::tril#
-
template<typename T>
Tensor<T, 2> vt::tril(const Tensor<T, 2> &tensor, int k = 0, bool copy = true)# Return a lower triangle of the 2D tensor.
- Template Parameters:
T – Data type of the tensor.
- Parameters:
tensor – The input tensor
k – An offset for the diagonal above which to zero elements.
copy – If false, the operation is performed in-place.
- Returns:
Tensor: The result tensor.
-
template<typename T, size_t N>
Tensor<T, N> vt::tril(const Tensor<T, N> &tensor, int k = 0)# Return a lower triangle of the tensor.
- Template Parameters:
T – Data type of the tensor.
N – Number of dimensions of the tensor.
- Parameters:
tensor – The input tensor
k – An offset for the diagonal above which to zero elements.
- Returns:
Tensor: The result tensor.