array-api-strict 1.1__tar.gz → 1.1.1__tar.gz

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 (39) hide show
  1. {array_api_strict-1.1 → array_api_strict-1.1.1}/PKG-INFO +5 -1
  2. {array_api_strict-1.1 → array_api_strict-1.1.1}/README.md +4 -0
  3. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_array_object.py +5 -1
  4. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_version.py +3 -3
  5. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/test_array_object.py +11 -1
  6. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict.egg-info/PKG-INFO +5 -1
  7. {array_api_strict-1.1 → array_api_strict-1.1.1}/LICENSE +0 -0
  8. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/__init__.py +0 -0
  9. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_constants.py +0 -0
  10. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_creation_functions.py +0 -0
  11. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_data_type_functions.py +0 -0
  12. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_dtypes.py +0 -0
  13. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_elementwise_functions.py +0 -0
  14. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_indexing_functions.py +0 -0
  15. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_manipulation_functions.py +0 -0
  16. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_searching_functions.py +0 -0
  17. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_set_functions.py +0 -0
  18. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_sorting_functions.py +0 -0
  19. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_statistical_functions.py +0 -0
  20. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_typing.py +0 -0
  21. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/_utility_functions.py +0 -0
  22. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/fft.py +0 -0
  23. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/linalg.py +0 -0
  24. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/__init__.py +0 -0
  25. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/test_creation_functions.py +0 -0
  26. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/test_data_type_functions.py +0 -0
  27. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/test_elementwise_functions.py +0 -0
  28. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/test_indexing_functions.py +0 -0
  29. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/test_manipulation_functions.py +0 -0
  30. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/test_set_functions.py +0 -0
  31. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/test_sorting_functions.py +0 -0
  32. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict/tests/test_validation.py +0 -0
  33. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict.egg-info/SOURCES.txt +0 -0
  34. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict.egg-info/dependency_links.txt +0 -0
  35. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict.egg-info/requires.txt +0 -0
  36. {array_api_strict-1.1 → array_api_strict-1.1.1}/array_api_strict.egg-info/top_level.txt +0 -0
  37. {array_api_strict-1.1 → array_api_strict-1.1.1}/setup.cfg +0 -0
  38. {array_api_strict-1.1 → array_api_strict-1.1.1}/setup.py +0 -0
  39. {array_api_strict-1.1 → array_api_strict-1.1.1}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: array_api_strict
3
- Version: 1.1
3
+ Version: 1.1.1
4
4
  Summary: A strict, minimal implementation of the Python array API standard.
5
5
  Home-page: https://data-apis.org/array-api-strict/
6
6
  Author: Consortium for Python Data API Standards
@@ -34,6 +34,10 @@ libraries. Consuming library code should use the
34
34
  support the array API. Rather, it is intended to be used in the test suites of
35
35
  consuming libraries to test their array API usage.
36
36
 
37
+ array-api-strict currently supports the 2022.12 version of the standard.
38
+ 2023.12 support is planned and is tracked by [this
39
+ issue](https://github.com/data-apis/array-api-strict/issues/25).
40
+
37
41
  ## Install
38
42
 
39
43
  `array-api-strict` is available on both
@@ -15,6 +15,10 @@ libraries. Consuming library code should use the
15
15
  support the array API. Rather, it is intended to be used in the test suites of
16
16
  consuming libraries to test their array API usage.
17
17
 
18
+ array-api-strict currently supports the 2022.12 version of the standard.
19
+ 2023.12 support is planned and is tracked by [this
20
+ issue](https://github.com/data-apis/array-api-strict/issues/25).
21
+
18
22
  ## Install
19
23
 
20
24
  `array-api-strict` is available on both
@@ -17,6 +17,8 @@ from __future__ import annotations
17
17
 
18
18
  import operator
19
19
  from enum import IntEnum
20
+ import warnings
21
+
20
22
  from ._creation_functions import asarray
21
23
  from ._dtypes import (
22
24
  _DType,
@@ -480,8 +482,10 @@ class Array:
480
482
  def __array_namespace__(
481
483
  self: Array, /, *, api_version: Optional[str] = None
482
484
  ) -> types.ModuleType:
483
- if api_version is not None and not api_version.startswith("2021."):
485
+ if api_version is not None and api_version not in ["2021.12", "2022.12"]:
484
486
  raise ValueError(f"Unrecognized array API version: {api_version!r}")
487
+ if api_version == "2021.12":
488
+ warnings.warn("The 2021.12 version of the array API specification was requested but the returned namespace is actually version 2022.12")
485
489
  import array_api_strict
486
490
  return array_api_strict
487
491
 
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-03-08T13:47:35-0700",
11
+ "date": "2024-03-29T16:44:48-0600",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "e6fb25db36ce4732478855520d75b4224a0cb067",
15
- "version": "1.1"
14
+ "full-revisionid": "b835dd24b8702b23e0b40dae82783dabeeb5d8e1",
15
+ "version": "1.1.1"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -23,7 +23,7 @@ from .._dtypes import (
23
23
  uint64,
24
24
  bool as bool_,
25
25
  )
26
-
26
+ import array_api_strict
27
27
 
28
28
  def test_validate_index():
29
29
  # The indexing tests in the official array API test suite test that the
@@ -398,3 +398,13 @@ def test_array_keys_use_private_array():
398
398
  key = ones((0, 0), dtype=bool_)
399
399
  with pytest.raises(IndexError):
400
400
  a[key]
401
+
402
+ def test_array_namespace():
403
+ a = ones((3, 3))
404
+ assert a.__array_namespace__() == array_api_strict
405
+ assert a.__array_namespace__(api_version=None) is array_api_strict
406
+ assert a.__array_namespace__(api_version="2022.12") is array_api_strict
407
+ with pytest.warns(UserWarning):
408
+ assert a.__array_namespace__(api_version="2021.12") is array_api_strict
409
+ pytest.raises(ValueError, lambda: a.__array_namespace__(api_version="2021.11"))
410
+ pytest.raises(ValueError, lambda: a.__array_namespace__(api_version="2023.12"))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: array_api_strict
3
- Version: 1.1
3
+ Version: 1.1.1
4
4
  Summary: A strict, minimal implementation of the Python array API standard.
5
5
  Home-page: https://data-apis.org/array-api-strict/
6
6
  Author: Consortium for Python Data API Standards
@@ -34,6 +34,10 @@ libraries. Consuming library code should use the
34
34
  support the array API. Rather, it is intended to be used in the test suites of
35
35
  consuming libraries to test their array API usage.
36
36
 
37
+ array-api-strict currently supports the 2022.12 version of the standard.
38
+ 2023.12 support is planned and is tracked by [this
39
+ issue](https://github.com/data-apis/array-api-strict/issues/25).
40
+
37
41
  ## Install
38
42
 
39
43
  `array-api-strict` is available on both
File without changes