MCPcopy Create free account
hub / github.com/numpy/numpy / __array_namespace__

Method __array_namespace__

numpy/array_api/_array_object.py:456–461  ·  view source on GitHub ↗
(
        self: Array, /, *, api_version: Optional[str] = None
    )

Source from the content-addressed store, hash-verified

454 return self.__class__._new(res)
455
456 def __array_namespace__(
457 self: Array, /, *, api_version: Optional[str] = None
458 ) -> types.ModuleType:
459 if api_version is not None and not api_version.startswith("2021."):
460 raise ValueError(f"Unrecognized array API version: {api_version!r}")
461 return array_api
462
463 def __bool__(self: Array, /) -> bool:
464 """

Callers

nothing calls this directly

Calls 1

startswithMethod · 0.80

Tested by

no test coverage detected