aesara.tensor.fill_diagonal_offset#
- aesara.tensor.fill_diagonal_offset(a, val, offset)[source]#
Returns a copy of an array with all elements of the main diagonal set to a specified scalar value.
- Parameters:
a – Rectangular array of two dimensions.
val – Scalar value to fill the diagonal whose type must be compatible with that of array
a(i.e.valcannot be viewed as an upcast ofa).offset – Scalar value Offset of the diagonal from the main diagonal. Can be positive or negative integer.
- Returns:
An array identical to
aexcept that its offset diagonal is filled with scalarval. The output is unwrapped.- Return type:
array