Skip to main content
Ctrl+K
NumPy v2.4 Manual - Home NumPy v2.4 Manual - Home
  • User Guide
  • API reference
  • Building from source
  • Development
  • Release notes
  • Learn
    • NEPs
  • GitHub
  • User Guide
  • API reference
  • Building from source
  • Development
  • Release notes
  • Learn
  • NEPs
  • GitHub

Section Navigation

  • NumPy’s module structure
  • Array objects
  • Universal functions (ufunc)
  • Routines and objects by topic
  • Typing (numpy.typing)
  • Packaging
  • NumPy C-API
  • Array API standard compatibility
    • numpy.__array_namespace_info__
      • numpy.__array_namespace_info__.capabilities
      • numpy.__array_namespace_info__.default_device
      • numpy.__array_namespace_info__.default_dtypes
      • numpy.__array_namespace_info__.devices
      • numpy.__array_namespace_info__.dtypes
  • CPU/SIMD optimizations
  • Thread Safety
  • Global Configuration Options
  • NumPy security
  • Testing guidelines
  • Status of numpy.distutils and migration advice
  • numpy.distutils user guide
  • NumPy and SWIG
  • NumPy reference
  • Array API standard compatibility
  • numpy.__array_namespace_info__

numpy.__array_namespace_info__#

class numpy.__array_namespace_info__[source]#

Get the array API inspection namespace for NumPy.

The array API inspection namespace defines the following functions:

  • capabilities()

  • default_device()

  • default_dtypes()

  • dtypes()

  • devices()

See

Returns:
infoModuleType

The array API inspection namespace for NumPy.

Examples

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

Methods

capabilities()

Return a dictionary of array API library capabilities.

default_device()

The default device used for new NumPy arrays.

default_dtypes(*[, device])

The default data types used for new NumPy arrays.

devices()

The devices supported by NumPy.

dtypes(*[, device, kind])

The array API data types supported by NumPy.

previous

Array API standard compatibility

next

numpy.__array_namespace_info__.capabilities

On this page
  • __array_namespace_info__

© Copyright 2008-2025, NumPy Developers.

Created using Sphinx 7.2.6.

Built with the PyData Sphinx Theme 0.16.1.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant