class_docstr: RecursiveAttr class to catch all attributes corresponding to numpy,
  when user calls fallback_mode. numpy is an instance of this class.
docstr: Returns False if CuPy's functions never accept the arguments as
  parameters due to the following reasons.
  - The inputs include an object of a NumPy's specific class other than
    `np.ndarray`.
  - The inputs include a dtype which is not supported in CuPy.
docstr_tok: ["Returns","False","if","CuPy","'s","functions","never","accept","the","arguments","as","parameters","due","to","the","following","reasons",".","-","The","inputs","include","an","object","of","a","NumPy","'s","specific","class","other","than","`","np.ndarray","`",".","-","The","inputs","include","a","dtype","which","is","not","supported","in","CuPy","."]
code: def _is_cupy_compatible(arg):
      """
      Returns False if CuPy's functions never accept the arguments as
      parameters due to the following reasons.
      - The inputs include an object of a NumPy's specific class other than
        `np.ndarray`.
      - The inputs include a dtype which is not supported in CuPy.
      """
  
      if isinstance(arg, ndarray):
          if not arg._supports_cupy:
              return False
  
      if isinstance(arg, (tuple, list)):
          return all(_RecursiveAttr._is_cupy_compatible(i) for i in arg)
  
      if isinstance(arg, dict):
          bools = [
              _RecursiveAttr._is_cupy_compatible(arg[i]) for i in arg
          ]
          return all(bools)
  
      return True
  
imports: import types
  import numpy
  import cupy
  from cupyx.fallback_mode import notification
label_desc: Use image node_id 6 for calling the _RecursiveAttr obj's underlying member method code with example usage: obj._is_cupy_compatible(arg) and returns: True, all, all, False