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