mlx.core.tril

目录

mlx.core.tril#

tril(x: array, k: int, *, stream: None | Stream | Device = None) array#

Zeros the array above the given diagonal.

参数:
  • x (array) -- input array.

  • k (int, optional) -- The diagonal of the 2-D array. Defaults to 0.

  • stream (Stream, optional) -- Stream or device. Defaults to None.

返回:

Array zeroed above the given diagonal

返回类型:

array