Skip to main content
`Ctrl`+`K`

# numpy.__array_namespace_info__.default_device

method

__array_namespace_info__.default_device()

  The default device used for new NumPy arrays.

  For NumPy, this always returns `'cpu'`.

  Returns:
    device str

      The default device used for new NumPy arrays.

  See also

  `__array_namespace_info__.capabilities`
  `__array_namespace_info__.default_dtypes`
  `__array_namespace_info__.dtypes`
  `__array_namespace_info__.devices`

  Examples

      >>> info = np.__array_namespace_info__()
      >>> info.default_device()
      'cpu'