Skip to main content
`Ctrl`+`K`

# numpy.__array_namespace_info__.default_dtypes

method

__array_namespace_info__.default_dtypes(*, device=None)

  The default data types used for new NumPy arrays.

  For NumPy, this always returns the following dictionary:

  - “real floating”: `numpy.float64`

  - “complex floating”: `numpy.complex128`

  - “integral”: `numpy.intp`

  - “indexing”: `numpy.intp`

  Parameters:
    device str, optional

      The device to get the default data types for. For NumPy, only `'cpu'` is allowed.

  Returns:
    dtypes dict

      A dictionary describing the default data types used for new NumPy arrays.

  See also

  `__array_namespace_info__.capabilities`
  `__array_namespace_info__.default_device`
  `__array_namespace_info__.dtypes`
  `__array_namespace_info__.devices`

  Examples

      >>> info = np.__array_namespace_info__()
      >>> info.default_dtypes()
      {'real floating': numpy.float64,
       'complex floating': numpy.complex128,
       'integral': numpy.int64,
       'indexing': numpy.int64}