fill_diagonal_¶
- paddle.Tensor. fill_diagonal_ ( x, value, offset=0, wrap=False, name=None )
-
- Notes:
-
This API is ONLY available in Dygraph mode
This function fill the value into the x Tensor’s diagonal inplace. :param x:
x
is the original Tensor :type x: Tensor :param value:value
is the value to filled in x :type value: Scale :param offset: the offset to the main diagonal. Default: 0 (main diagonal). :type offset: int,optional :param wrap: the diagonal ‘wrapped’ after N columns for tall matrices. :type wrap: bool,optional :param name: Name for the operation (optional, default is None) :type name: str,optional- Returns
-
Tensor with diagonal filled with value.
- Return type
-
Tensor
- Returns type:
-
dtype is same as x Tensor
Examples