The diagflat function#

Aliases#

halerium.core.diagflat
halerium.core.math.diagflat
diagflat(operand, k=0)#

Create a two-dimensional tensor with the flattened input as a diagonal.

Parameters:
  • operand – The input of the operation.

  • k (int) – The diagonal to set, with 0 corresponding to the main diagonal.

Returns:

operator – The halerium Operator representing the operation.

Return type:

halerium.core.operator.DiagFlat