numpy.__array_namespace_info__.capabilities#

method

__array_namespace_info__.capabilities()[source]#

Return a dictionary of array API library capabilities.

The resulting dictionary has the following keys:

  • “boolean indexing”: boolean indicating whether an array library supports boolean indexing. Always True for NumPy.

  • “data-dependent shapes”: boolean indicating whether an array library supports data-dependent output shapes. Always True for NumPy.

See https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.capabilities.html for more details.

Returns:
capabilitiesdict

A dictionary of array API library capabilities.

Examples

>>> info = np.__array_namespace_info__()
>>> info.capabilities()
{'boolean indexing': True,
 'data-dependent shapes': True}