Skip to main content

//clika-runtime/io.clika.runtime/Ops/fillDiagonal

fillDiagonal

[common]
fun fillDiagonal(input: Tensor, fillValue: Double, wrap: Boolean = false, device: Placement? = null): Tensor

fillDiagonal(input: Tensor, fillValue: Double, wrap: Boolean = false, device: Placement? = null): the fill_diagonal operator. A copy of the 2-D matrix input with fill_value written along its diagonal. Without wrap the diagonal stops at min(rows, cols); with wrap = true a TALL matrix continues the diagonal below the wrap row, restarting at the left edge (the classic tall-matrix wrap).