array-api-strict 2.3__py3-none-any.whl → 2.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. array_api_strict/__init__.py +11 -5
  2. array_api_strict/_array_object.py +226 -200
  3. array_api_strict/_constants.py +1 -1
  4. array_api_strict/_creation_functions.py +97 -119
  5. array_api_strict/_data_type_functions.py +73 -64
  6. array_api_strict/_dtypes.py +35 -24
  7. array_api_strict/_elementwise_functions.py +138 -482
  8. array_api_strict/_fft.py +28 -32
  9. array_api_strict/_flags.py +65 -26
  10. array_api_strict/_helpers.py +23 -14
  11. array_api_strict/_indexing_functions.py +3 -8
  12. array_api_strict/_info.py +64 -69
  13. array_api_strict/_linalg.py +57 -53
  14. array_api_strict/_linear_algebra_functions.py +11 -9
  15. array_api_strict/_manipulation_functions.py +30 -30
  16. array_api_strict/_searching_functions.py +22 -33
  17. array_api_strict/_set_functions.py +4 -6
  18. array_api_strict/_sorting_functions.py +6 -6
  19. array_api_strict/_statistical_functions.py +57 -64
  20. array_api_strict/_typing.py +30 -50
  21. array_api_strict/_utility_functions.py +11 -13
  22. array_api_strict/_version.py +2 -2
  23. array_api_strict/py.typed +0 -0
  24. array_api_strict/tests/test_array_object.py +163 -56
  25. array_api_strict/tests/test_creation_functions.py +14 -12
  26. array_api_strict/tests/test_data_type_functions.py +40 -6
  27. array_api_strict/tests/test_elementwise_functions.py +94 -45
  28. array_api_strict/tests/test_searching_functions.py +79 -1
  29. array_api_strict/tests/test_validation.py +1 -3
  30. {array_api_strict-2.3.dist-info → array_api_strict-2.4.dist-info}/METADATA +5 -4
  31. array_api_strict-2.4.dist-info/RECORD +44 -0
  32. {array_api_strict-2.3.dist-info → array_api_strict-2.4.dist-info}/WHEEL +1 -1
  33. array_api_strict-2.3.dist-info/RECORD +0 -43
  34. {array_api_strict-2.3.dist-info → array_api_strict-2.4.dist-info}/LICENSE +0 -0
  35. {array_api_strict-2.3.dist-info → array_api_strict-2.4.dist-info}/top_level.txt +0 -0
@@ -16,6 +16,8 @@ consuming libraries to test their array API usage.
16
16
 
17
17
  """
18
18
 
19
+ from types import ModuleType
20
+
19
21
  __all__ = []
20
22
 
21
23
  # Warning: __array_api_version__ could change globally with
@@ -325,12 +327,16 @@ from ._flags import (
325
327
  ArrayAPIStrictFlags,
326
328
  )
327
329
 
328
- __all__ += ['set_array_api_strict_flags', 'get_array_api_strict_flags', 'reset_array_api_strict_flags', 'ArrayAPIStrictFlags']
330
+ __all__ += [
331
+ 'set_array_api_strict_flags',
332
+ 'get_array_api_strict_flags',
333
+ 'reset_array_api_strict_flags',
334
+ 'ArrayAPIStrictFlags',
335
+ '__version__',
336
+ ]
329
337
 
330
338
  try:
331
- from . import _version
332
- __version__ = _version.__version__
333
- del _version
339
+ from ._version import __version__ # type: ignore[import-not-found,unused-ignore]
334
340
  except ImportError:
335
341
  __version__ = "unknown"
336
342
 
@@ -340,7 +346,7 @@ except ImportError:
340
346
  # use __getattr__. Note that linalg and fft are dynamically added and removed
341
347
  # from __all__ in set_array_api_strict_flags.
342
348
 
343
- def __getattr__(name):
349
+ def __getattr__(name: str) -> ModuleType:
344
350
  if name in ['linalg', 'fft']:
345
351
  if name in get_array_api_strict_flags()['enabled_extensions']:
346
352
  if name == 'linalg':