parameters: (shape, dtype="float32", value=0.0)
return_statement: return jt.array(value).unary(dtype).broadcast(NanoVector(shape))
docstring: Generate constant Jittor Var.
  
      Args:
          shape (int or tuple of int):
              shape of the output Var
          dtype (string):
              dtype of the output Var, default float32
          value (int or float):
              value to be filled in output Var
      
      Return:
          A Jittor Var which filled by constant value.
  
      Example::
  
          from jittor import init
          print(init.constant(2))
          # output: [0.,0.]
          print(init.constant((2,3), value=1.))
          # output: [[1.,1.,1.],[1.,1.,1.]]
docstring_summary: Generate constant Jittor Var.
docstring_tokens: Generate constant Jittor Var .
function: def constant(shape, dtype="float32", value=0.0):
      '''Generate constant Jittor Var.
  
      Args:
          shape (int or tuple of int):
              shape of the output Var
          dtype (string):
              dtype of the output Var, default float32
          value (int or float):
              value to be filled in output Var
      
      Return:
          A Jittor Var which filled by constant value.
  
      Example::
  
          from jittor import init
          print(init.constant(2))
          # output: [0.,0.]
          print(init.constant((2,3), value=1.))
          # output: [[1.,1.,1.],[1.,1.,1.]]
  
      '''
      return jt.array(value).unary(dtype).broadcast(NanoVector(shape))
function_tokens: def constant ( shape , dtype = "float32" , value = 0.0 ) : return jt . array ( value ) . unary ( dtype ) . broadcast ( NanoVector ( shape ) )