parameters: (key: str)
docstring: Return copy of scalar or array QCVariable *key* from global memory.
  
      Returns
      -------
      float or numpy.ndarray or Matrix
          Scalar variables are returned as floats.
          Array variables not naturally 2D (like multipoles) are returned as :class:`numpy.ndarray` of natural dimensionality.
          Other array variables are returned as :py:class:`~psi4.core.Matrix` and may have an extra dimension with symmetry information.
  
      Example
      -------
      >>> psi4.gradient("hf/cc-pvdz")
      >>> psi4.variable("CURRENT ENERGY")
      -100.00985995185668
      >>> psi4.variable("CURRENT DIPOLE")
      array([ 0.        ,  0.        , -0.83217802])
      >>> psi4.variable("CURRENT GRADIENT")
      <psi4.core.Matrix object at 0x12d884fc0>
      >>> psi4.variable("CURRENT GRADIENT").np
      array([[ 6.16297582e-33,  6.16297582e-33, -9.41037138e-02],
             [-6.16297582e-33, -6.16297582e-33,  9.41037138e-02]])
docstring_summary: Return copy of scalar or array QCVariable *key* from global memory.
docstring_tokens: Return copy of scalar or array QCVariable * key * from global memory .
function: def _core_variable(key: str) -> Union[float, core.Matrix, np.ndarray]:
      """Return copy of scalar or array QCVariable *key* from global memory.
  
      Returns
      -------
      float or numpy.ndarray or Matrix
          Scalar variables are returned as floats.
          Array variables not naturally 2D (like multipoles) are returned as :class:`numpy.ndarray` of natural dimensionality.
          Other array variables are returned as :py:class:`~psi4.core.Matrix` and may have an extra dimension with symmetry information.
  
      Example
      -------
      >>> psi4.gradient("hf/cc-pvdz")
      >>> psi4.variable("CURRENT ENERGY")
      -100.00985995185668
      >>> psi4.variable("CURRENT DIPOLE")
      array([ 0.        ,  0.        , -0.83217802])
      >>> psi4.variable("CURRENT GRADIENT")
      <psi4.core.Matrix object at 0x12d884fc0>
      >>> psi4.variable("CURRENT GRADIENT").np
      array([[ 6.16297582e-33,  6.16297582e-33, -9.41037138e-02],
             [-6.16297582e-33, -6.16297582e-33,  9.41037138e-02]])
  
      """
      key = _qcvar_warnings(key)
  
      if core.has_scalar_variable(key):
          return core.scalar_variable(key)
      elif core.has_array_variable(key):
          return _qcvar_reshape_get(key, core.array_variable(key))
      else:
          raise KeyError("psi4.core.variable: Requested variable " + key + " was not set!\n")
function_tokens: def _core_variable ( key : str ) -> Union [ float , core . Matrix , np . ndarray ] : key = _qcvar_warnings ( key ) if core . has_scalar_variable ( key ) : return core . scalar_variable ( key ) elif core . has_array_variable ( key ) : return _qcvar_reshape_get ( key , core . array_variable ( key ) ) else : raise KeyError ( "psi4.core.variable: Requested variable " + key + " was not set!\n" )