class_docstr: Context manager method to set cuML's global output type inside a `with`
  statement. It gets reset to the prior value it had once the `with` code
  block is executer.
  
  Parameters
  ----------
  output_type : {'input', 'cudf', 'cupy', 'numpy'} (default = 'input')
      Desired output type of results and attributes of the estimators.
  
      * ``'input'`` will mean that the parameters and methods will mirror the
        format of the data sent to the estimators/methods as much as
        possible. Specifically:
  
        +---------------------------------------+--------------------------+
        | Input type                            | Output type              |
        +=======================================+==========================+
        | cuDF DataFrame or Series              | cuDF DataFrame or Series |
        +---------------------------------------+--------------------------+
        | NumPy arrays                          | NumPy arrays             |
        +---------------------------------------+--------------------------+
        | Pandas DataFrame or Series            | NumPy arrays             |
        +---------------------------------------+--------------------------+
        | Numba device arrays                   | Numba device arrays      |
        +---------------------------------------+--------------------------+
        | CuPy arrays                           | CuPy arrays              |
        +---------------------------------------+--------------------------+
        | Other `__cuda_array_interface__` objs | CuPy arrays              |
        +---------------------------------------+--------------------------+
  
      * ``'cudf'`` will return cuDF Series for single dimensional results and
        DataFrames for the rest.
  
      * ``'cupy'`` will return CuPy arrays.
  
      * ``'numpy'`` will return NumPy arrays.
  
  Examples
  --------
  
  >>> import cuml
  >>> import cupy as cp
  >>> ary = [[1.0, 4.0, 4.0], [2.0, 2.0, 2.0], [5.0, 1.0, 1.0]]
  >>> ary = cp.asarray(ary)
  >>> with cuml.using_output_type('cudf'):
  ...     dbscan_float = cuml.DBSCAN(eps=1.0, min_samples=1)
  ...     dbscan_float.fit(ary)
  ...
  ...     print("cuML output inside 'with' context")
  ...     print(dbscan_float.labels_)
  ...     print(type(dbscan_float.labels_))
  ...
  DBSCAN()
  cuML output inside 'with' context
  0    0
  1    1
  2    2
  dtype: int32
  <class 'cudf.core.series.Series'>
  >>> # use cuml again outside the context manager
  >>> dbscan_float2 = cuml.DBSCAN(eps=1.0, min_samples=1)
  >>> dbscan_float2.fit(ary)
  DBSCAN()
  >>> # cuML default output
  >>> dbscan_float2.labels_
  array([0, 1, 2], dtype=int32)
  >>> isinstance(dbscan_float2.labels_, cp.ndarray)
  True
class_docstr_tok: ["Context","manager","method","to","set","cuML","'s","global","output","type","inside","a","`","with","`","statement",".","It","gets","reset","to","the","prior","value","it","had","once","the","`","with","`","code","block","is","executer",".","Parameters","--","--","--","--","--","output_type",":","{","'input","'",",","'cudf","'",",","'cupy","'",",","'numpy","'","}","(","default","=","'input","'",")","Desired","output","type","of","results","and","attributes","of","the","estimators",".","*","``","'input","'","``","will","mean","that","the","parameters","and","methods","will","mirror","the","format","of","the","data","sent","to","the","estimators\/methods","as","much","as","possible",".","Specifically",":","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","Input","type","|","Output","type","|","+=======================================+==========================+","|","cuDF","DataFrame","or","Series","|","cuDF","DataFrame","or","Series","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","NumPy","arrays","|","NumPy","arrays","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","Pandas","DataFrame","or","Series","|","NumPy","arrays","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","Numba","device","arrays","|","Numba","device","arrays","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","CuPy","arrays","|","CuPy","arrays","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","Other","`","__cuda_array_interface__","`","objs","|","CuPy","arrays","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","*","``","'cudf","'","``","will","return","cuDF","Series","for","single","dimensional","results","and","DataFrames","for","the","rest",".","*","``","'cupy","'","``","will","return","CuPy","arrays",".","*","``","'numpy","'","``","will","return","NumPy","arrays",".","Examples","--","--","--","--",">",">",">","import","cuml",">",">",">","import","cupy","as","cp",">",">",">","ary","=","[","[","1.0",",","4.0",",","4.0","]",",","[","2.0",",","2.0",",","2.0","]",",","[","5.0",",","1.0",",","1.0","]","]",">",">",">","ary","=","cp.asarray","(","ary",")",">",">",">","with","cuml.using_output_type","(","'cudf","'",")",":","...","dbscan_float","=","cuml.DBSCAN","(","eps=1.0",",","min_samples=1",")","...","dbscan_float.fit","(","ary",")","...","...","print","(","``","cuML","output","inside","'with","'","context","''",")","...","print","(","dbscan_float.labels_",")","...","print","(","type","(","dbscan_float.labels_",")",")","...","DBSCAN","(",")","cuML","output","inside","'with","'","context","0","0","1","1","2","2","dtype",":","int32","<","class","'cudf.core.series.Series","'",">",">",">",">","#","use","cuml","again","outside","the","context","manager",">",">",">","dbscan_float2","=","cuml.DBSCAN","(","eps=1.0",",","min_samples=1",")",">",">",">","dbscan_float2.fit","(","ary",")","DBSCAN","(",")",">",">",">","#","cuML","default","output",">",">",">","dbscan_float2.labels_","array","(","[","0",",","1",",","2","]",",","dtype=int32",")",">",">",">","isinstance","(","dbscan_float2.labels_",",","cp.ndarray",")","True"]
code: def __init__(self, output_type):
      self.output_type = output_type
  
imports: import functools
  import operator
  import re
  from functools import wraps
  from cuml.internals.global_settings import GlobalSettings
  from cuml.internals.device_support import GPU_ENABLED
  from cuml.internals.mem_type import MemoryType
  from cuml.internals.output_type import INTERNAL_VALID_OUTPUT_TYPES, VALID_OUTPUT_TYPES
  from cuml.internals.safe_imports import cpu_only_import_from, gpu_only_import_from, UnavailableNullContext
label_desc: Use image node_id 1 to create a new using_output_type object  with example: obj = using_output_type(output_type)