docstr: 将 tensor 转为 numpy
  
  :param tensor:
  :return:
docstr_tok: ["\u5c06","tensor","\u8f6c\u4e3a","numpy",":","param","tensor",":",":","return",":"]
code: def tensor2numpy(self, tensor):
      """
      将 tensor 转为 numpy
  
      :param tensor:
      :return:
      """
      if isinstance(tensor, jittor.Var):
          return tensor.detach().numpy()
      elif isinstance(tensor, np.array):
          return tensor
      else:
          raise ValueError(
              f"tensor: {tensor} can not convert to ndarray!"
          )
  
file_path: fastNLP/fastNLP/core/metrics/backend/jittor_backend/backend.py
imports: import numpy
  from fastNLP.envs.imports import _NEED_IMPORT_JITTOR
  from fastNLP.core.metrics.backend import Backend
label_desc: Use image node_id 7 for calling the JittorBackend obj's underlying member method code with example usage: obj.tensor2numpy(tensor) and returns: tensor, tensor