parameters: (self)
return_statement: return array_ops.ones(shape=d_shape, dtype=self.dtype)
docstring: Returns the diagonal of this operator as all ones.
docstring_summary: Returns the diagonal of this operator as all ones.
docstring_tokens: Returns the diagonal of this operator as all ones .
function: def _ones_diag(self):
      """Returns the diagonal of this operator as all ones."""
      if self.shape.is_fully_defined():
        d_shape = self.batch_shape.concatenate([self._min_matrix_dim()])
      else:
        d_shape = array_ops.concat(
            [self.batch_shape_tensor(),
             [self._min_matrix_dim_tensor()]], axis=0)
  
      return array_ops.ones(shape=d_shape, dtype=self.dtype)
function_tokens: def _ones_diag ( self ) : if self . shape . is_fully_defined ( ) : d_shape = self . batch_shape . concatenate ( [ self . _min_matrix_dim ( ) ] ) else : d_shape = array_ops . concat ( [ self . batch_shape_tensor ( ) , [ self . _min_matrix_dim_tensor ( ) ] ] , axis = 0 ) return array_ops . ones ( shape = d_shape , dtype = self . dtype )