original_docstring: 
      Function to call `model_func(X)` using either `NumPy` arrays if
      gpu_model is False or X directly if model_gpu based is True.
      Returns the results as CuPy arrays.
      
docstring: Function to call `model_func(X)` using either `NumPy` arrays if
  gpu_model is False or X directly if model_gpu based is True.
  Returns the results as CuPy arrays.
docstring_tokens: Function to call ` model_func ( X ) ` using either ` NumPy ` arrays if gpu_model is False or X directly if model_gpu based is True . Returns the results as CuPy arrays .
code: def model_func_call(X,
                      model_func,
                      gpu_model=False):
      """
      Function to call `model_func(X)` using either `NumPy` arrays if
      gpu_model is False or X directly if model_gpu based is True.
      Returns the results as CuPy arrays.
      """
      if gpu_model:
          y = input_to_cupy_array(X=model_func(X),
                                  order='K').array
      else:
          try:
              y = input_to_cupy_array(model_func(
                  cp.asnumpy(X)
              )).array
          except TypeError:
              raise TypeError('Explainer can only explain models that can '
                              'take GPU data or NumPy arrays as input.')
  
      return y
code_tokens: def model_func_call ( X , model_func , gpu_model = False ) : if gpu_model : y = input_to_cupy_array ( X = model_func ( X ) , order = 'K' ) . array else : try : y = input_to_cupy_array ( model_func ( cp . asnumpy ( X ) ) ) . array except TypeError : raise TypeError ( 'Explainer can only explain models that can ' 'take GPU data or NumPy arrays as input.' ) return y
short_docstring: Function to call `model_func(X)` using either `NumPy` arrays if
  gpu_model is False or X directly if model_gpu based is True.
short_docstring_tokens: Function to call ` model_func ( X ) ` using either ` NumPy ` arrays if gpu_model is False or X directly if model_gpu based is True .
comment: """
      Function to call `model_func(X)` using either `NumPy` arrays if
      gpu_model is False or X directly if model_gpu based is True.
      Returns the results as CuPy arrays.
      """