parameters: (var)
return_statement: return var.assign(one(var.shape, var.dtype))
docstring: Inplace initialize variable with one.
  
      Args:
          var (Jittor Var):
              Var to initialize with one.
      
      Return:
          var itself.
      
      Example::
  
          from jittor import init
          from jittor import nn
          linear = nn.Linear(2,2)
          init.one_(linear.weight)
          print(linear.weight)
          # output: [[1.,1.],[1.,1.]]
          linear.weight.one_() # This is ok too
docstring_summary: Inplace initialize variable with one.
docstring_tokens: Inplace initialize variable with one .
function: def one_(var):
      ''' Inplace initialize variable with one.
  
      Args:
          var (Jittor Var):
              Var to initialize with one.
      
      Return:
          var itself.
      
      Example::
  
          from jittor import init
          from jittor import nn
          linear = nn.Linear(2,2)
          init.one_(linear.weight)
          print(linear.weight)
          # output: [[1.,1.],[1.,1.]]
          linear.weight.one_() # This is ok too
  
      '''
      return var.assign(one(var.shape, var.dtype))
function_tokens: def one_ ( var ) : return var . assign ( one ( var . shape , var . dtype ) )