class_docstr: A math engine working on GPU.
  
  :param gpu_index: the index of the GPU on which you wish to work. 
      Use the `enum_gpu` method to get the list.
      Use `None` for auto-selection.
  :type gpu_index: int, >= 0 or None
code: def __init__(self, gpu_index=None):
      if gpu_index is None:
          gpu_index = -1
  
      if isinstance(gpu_index, PythonWrapper.MathEngine):
          super().__init__(gpu_index)
          return
  
      gpus = enum_gpu()
      if len(gpus) == 0:
          raise ValueError("No GPU available")
      if gpu_index < -1 or gpu_index >= len(gpus):
          raise ValueError("GPU with index `gpu_index` doesn't exist.")
  
      internal = PythonWrapper.MathEngine("gpu", int(gpu_index))
      super().__init__(internal)
  
file_path: neoml/NeoML/Python/neoml/MathEngine.py
imports: import neoml.PythonWrapper
label_desc: Use image node_id 1 to create a new GpuMathEngine object from inherited base classes: MathEngine with example: obj = GpuMathEngine(gpu_index)