Without type hints, it is very inconvenient because of spelling errors of array_api functions. As array_api_compat seems to be a superset of array_api_strict, I would like to propose to simply set the return type of array_namespace() to array_api_strict, although it might be confusing.
|
def array_namespace(*xs, api_version=None, use_compat=None): |
from typing import overload
import array_api_strict
array_api_compat_type = array_api_strict
@overload
def array_namespace(*xs, api_version=None, use_compat: None=None) -> array_api_compat_type:
...