types-array-api 1.1.4__tar.gz → 1.2.0__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.
- {types_array_api-1.1.4/src/types_array_api.egg-info → types_array_api-1.2.0}/PKG-INFO +5 -5
- {types_array_api-1.1.4 → types_array_api-1.2.0}/README.md +3 -3
- {types_array_api-1.1.4 → types_array_api-1.2.0}/pyproject.toml +5 -5
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api/_2022_12.py +1 -1
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api/_2023_12.py +1 -1
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api/_2024_12.py +2 -3
- types_array_api-1.2.0/src/array_api/__init__.py +1 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api/_draft.py +2 -3
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api/cli/_main.py +1 -1
- types_array_api-1.2.0/src/array_api/latest.py +1 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api_compat/__init__.pyi +1 -1
- {types_array_api-1.1.4 → types_array_api-1.2.0/src/types_array_api.egg-info}/PKG-INFO +5 -5
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/types_array_api.egg-info/SOURCES.txt +1 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/tests/test_main.py +1 -1
- types_array_api-1.1.4/src/array_api/__init__.py +0 -1
- {types_array_api-1.1.4 → types_array_api-1.2.0}/LICENSE +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/LICENSE-MIT +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/setup.cfg +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/setup.py +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api/__main__.py +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api/cli/__init__.py +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api/cli/cli.py +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/array_api/py.typed +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/types_array_api.egg-info/dependency_links.txt +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/types_array_api.egg-info/entry_points.txt +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/types_array_api.egg-info/requires.txt +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/src/types_array_api.egg-info/top_level.txt +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/tests/test_cli.py +0 -0
- {types_array_api-1.1.4 → types_array_api-1.2.0}/tests/test_dunder_main.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: types-array-api
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Typing for array API and array-api-compat
|
|
5
5
|
Author-email: 34j <34j.95a2p@simplelogin.com>
|
|
6
6
|
License-Expression: MIT AND Apache-2.0
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
20
|
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.12
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
License-File: LICENSE-MIT
|
|
@@ -99,7 +99,7 @@ xp = array_api_compat.array_namespace(x)
|
|
|
99
99
|
There are multiple ways to type functions:
|
|
100
100
|
|
|
101
101
|
- ```python
|
|
102
|
-
from array_api.
|
|
102
|
+
from array_api.latest import Array
|
|
103
103
|
|
|
104
104
|
def simple(x: Array) -> Array:
|
|
105
105
|
return x + 1
|
|
@@ -123,7 +123,7 @@ You can test if an object matches the Protocol as they are [`runtime-checkable`]
|
|
|
123
123
|
```python
|
|
124
124
|
import array_api_strict
|
|
125
125
|
|
|
126
|
-
from array_api.
|
|
126
|
+
from array_api.latest import ArrayNamespace, ArrayNamespaceFull
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
assert isinstance(array_api_strict, ArrayNamespace)
|
|
@@ -137,7 +137,7 @@ assert not isinstance(array_api_strict, ArrayNamespaceFull)
|
|
|
137
137
|
- To clarify the input and output shapes, `ShapedArray` and `ShapedAnyArray` can be used:
|
|
138
138
|
|
|
139
139
|
```python
|
|
140
|
-
from array_api.
|
|
140
|
+
from array_api.latest import ShapedAnyArray as Array
|
|
141
141
|
|
|
142
142
|
def sum_last_axis[*TShape](x: Array[*TShape, Any]) -> Array[*TShape]:
|
|
143
143
|
return xp.sum(x, axis=-1)
|
|
@@ -68,7 +68,7 @@ xp = array_api_compat.array_namespace(x)
|
|
|
68
68
|
There are multiple ways to type functions:
|
|
69
69
|
|
|
70
70
|
- ```python
|
|
71
|
-
from array_api.
|
|
71
|
+
from array_api.latest import Array
|
|
72
72
|
|
|
73
73
|
def simple(x: Array) -> Array:
|
|
74
74
|
return x + 1
|
|
@@ -92,7 +92,7 @@ You can test if an object matches the Protocol as they are [`runtime-checkable`]
|
|
|
92
92
|
```python
|
|
93
93
|
import array_api_strict
|
|
94
94
|
|
|
95
|
-
from array_api.
|
|
95
|
+
from array_api.latest import ArrayNamespace, ArrayNamespaceFull
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
assert isinstance(array_api_strict, ArrayNamespace)
|
|
@@ -106,7 +106,7 @@ assert not isinstance(array_api_strict, ArrayNamespaceFull)
|
|
|
106
106
|
- To clarify the input and output shapes, `ShapedArray` and `ShapedAnyArray` can be used:
|
|
107
107
|
|
|
108
108
|
```python
|
|
109
|
-
from array_api.
|
|
109
|
+
from array_api.latest import ShapedAnyArray as Array
|
|
110
110
|
|
|
111
111
|
def sum_last_axis[*TShape](x: Array[*TShape, Any]) -> Array[*TShape]:
|
|
112
112
|
return xp.sum(x, axis=-1)
|
|
@@ -4,14 +4,14 @@ requires = [ "setuptools" ]
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "types-array-api"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.2.0"
|
|
8
8
|
description = "Typing for array API and array-api-compat"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT AND Apache-2.0"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name = "34j", email = "34j.95a2p@simplelogin.com" },
|
|
13
13
|
]
|
|
14
|
-
requires-python = ">=3.
|
|
14
|
+
requires-python = ">=3.12"
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Development Status :: 2 - Pre-Alpha",
|
|
17
17
|
"Intended Audience :: Developers",
|
|
@@ -45,8 +45,8 @@ dev = [
|
|
|
45
45
|
"array-api-compat>=1.11.2",
|
|
46
46
|
"array-api-strict>=2.3.1",
|
|
47
47
|
"attrs>=25.3.0",
|
|
48
|
-
"pytest>=
|
|
49
|
-
"pytest-cov>=
|
|
48
|
+
"pytest>=9,<10",
|
|
49
|
+
"pytest-cov>=7,<8",
|
|
50
50
|
"rich>=14.0.0",
|
|
51
51
|
"ruff>=0.11.13",
|
|
52
52
|
"typer>=0.16.0",
|
|
@@ -55,7 +55,7 @@ docs = [
|
|
|
55
55
|
"furo>=2023.5.20; python_version>='3.11'",
|
|
56
56
|
"myst-parser>=0.16; python_version>='3.11'",
|
|
57
57
|
"sphinx>=4; python_version>='3.11'",
|
|
58
|
-
"sphinx-autobuild>=
|
|
58
|
+
"sphinx-autobuild>=2025,<2026; python_version>='3.11'",
|
|
59
59
|
]
|
|
60
60
|
|
|
61
61
|
[tool.ruff]
|
|
@@ -8,18 +8,17 @@ from types import EllipsisType as ellipsis
|
|
|
8
8
|
from typing import (
|
|
9
9
|
Any,
|
|
10
10
|
Literal,
|
|
11
|
-
Optional,
|
|
12
11
|
Protocol,
|
|
12
|
+
Self,
|
|
13
13
|
TypedDict,
|
|
14
14
|
runtime_checkable,
|
|
15
15
|
)
|
|
16
16
|
|
|
17
17
|
from typing_extensions import CapsuleType as PyCapsule
|
|
18
|
-
from typing_extensions import Self
|
|
19
18
|
|
|
20
19
|
inf = float("inf")
|
|
21
20
|
|
|
22
|
-
Capabilities = TypedDict("Capabilities", {"boolean indexing": bool, "data-dependent shapes": bool, "max rank":
|
|
21
|
+
Capabilities = TypedDict("Capabilities", {"boolean indexing": bool, "data-dependent shapes": bool, "max rank": int | None})
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
class DataTypes(TypedDict, total=False):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.0"
|
|
@@ -8,18 +8,17 @@ from types import EllipsisType as ellipsis
|
|
|
8
8
|
from typing import (
|
|
9
9
|
Any,
|
|
10
10
|
Literal,
|
|
11
|
-
Optional,
|
|
12
11
|
Protocol,
|
|
12
|
+
Self,
|
|
13
13
|
TypedDict,
|
|
14
14
|
runtime_checkable,
|
|
15
15
|
)
|
|
16
16
|
|
|
17
17
|
from typing_extensions import CapsuleType as PyCapsule
|
|
18
|
-
from typing_extensions import Self
|
|
19
18
|
|
|
20
19
|
inf = float("inf")
|
|
21
20
|
|
|
22
|
-
Capabilities = TypedDict("Capabilities", {"boolean indexing": bool, "data-dependent shapes": bool, "max rank":
|
|
21
|
+
Capabilities = TypedDict("Capabilities", {"boolean indexing": bool, "data-dependent shapes": bool, "max rank": int | None})
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
class DataTypes(TypedDict, total=False):
|
|
@@ -251,7 +251,7 @@ def generate(body_module: dict[str, list[ast.stmt]], out_path: Path) -> None:
|
|
|
251
251
|
# Create Protocols with __call__, representing functions
|
|
252
252
|
for submodule, body in body_module.items():
|
|
253
253
|
for i, b in enumerate(body):
|
|
254
|
-
if isinstance(b,
|
|
254
|
+
if isinstance(b, ast.Import | ast.ImportFrom):
|
|
255
255
|
pass
|
|
256
256
|
elif isinstance(b, ast.FunctionDef):
|
|
257
257
|
# implemented in object rather than Namespace
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from ._2024_12 import * # noqa
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: types-array-api
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Typing for array API and array-api-compat
|
|
5
5
|
Author-email: 34j <34j.95a2p@simplelogin.com>
|
|
6
6
|
License-Expression: MIT AND Apache-2.0
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
20
|
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.12
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
License-File: LICENSE-MIT
|
|
@@ -99,7 +99,7 @@ xp = array_api_compat.array_namespace(x)
|
|
|
99
99
|
There are multiple ways to type functions:
|
|
100
100
|
|
|
101
101
|
- ```python
|
|
102
|
-
from array_api.
|
|
102
|
+
from array_api.latest import Array
|
|
103
103
|
|
|
104
104
|
def simple(x: Array) -> Array:
|
|
105
105
|
return x + 1
|
|
@@ -123,7 +123,7 @@ You can test if an object matches the Protocol as they are [`runtime-checkable`]
|
|
|
123
123
|
```python
|
|
124
124
|
import array_api_strict
|
|
125
125
|
|
|
126
|
-
from array_api.
|
|
126
|
+
from array_api.latest import ArrayNamespace, ArrayNamespaceFull
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
assert isinstance(array_api_strict, ArrayNamespace)
|
|
@@ -137,7 +137,7 @@ assert not isinstance(array_api_strict, ArrayNamespaceFull)
|
|
|
137
137
|
- To clarify the input and output shapes, `ShapedArray` and `ShapedAnyArray` can be used:
|
|
138
138
|
|
|
139
139
|
```python
|
|
140
|
-
from array_api.
|
|
140
|
+
from array_api.latest import ShapedAnyArray as Array
|
|
141
141
|
|
|
142
142
|
def sum_last_axis[*TShape](x: Array[*TShape, Any]) -> Array[*TShape]:
|
|
143
143
|
return xp.sum(x, axis=-1)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.1.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{types_array_api-1.1.4 → types_array_api-1.2.0}/src/types_array_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{types_array_api-1.1.4 → types_array_api-1.2.0}/src/types_array_api.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|