Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 65170a7

Browse filesBrowse files
committed
fixes for ci after rebase
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
1 parent 950fe94 commit 65170a7
Copy full SHA for 65170a7

File tree

6 files changed

+20
-16
lines changed
Filter options

6 files changed

+20
-16
lines changed

‎spec/draft/API_specification/array_object.rst

Copy file name to clipboardExpand all lines: spec/draft/API_specification/array_object.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ A conforming implementation of the array API standard must provide and support a
163163
- `operator.ne(x1, x2) <https://docs.python.org/3/library/operator.html#operator.ne>`_
164164
- `operator.__ne__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__ne__>`_
165165

166-
:meth:`.array.__lt__`, :meth:`.array.__le__`, :meth:`.array.__gt__`, :meth:`.array.__ge__` are only defined for arrays having real-valued data types. Other comparison operators should be defined for arrays having any data type.
166+
:meth:`.Array.__lt__`, :meth:`.Array.__le__`, :meth:`.Array.__gt__`, :meth:`.Array.__ge__` are only defined for arrays having real-valued data types. Other comparison operators should be defined for arrays having any data type.
167167
For backward compatibility, conforming implementations may support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent (see :ref:`complex-number-ordering`).
168168

169169
In-place Operators

‎src/_array_api_conf.py

Copy file name to clipboardExpand all lines: src/_array_api_conf.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
("py:obj", "typing.Union[int, float, typing.Literal[inf, - inf]]"),
6363
("py:class", "int | float | ~typing.Literal[inf, -inf]"),
6464
("py:class", "enum.Enum"),
65+
("py:class", "Enum"),
6566
("py:class", "ellipsis"),
6667
]
6768
nitpick_ignore_regex = [

‎src/array_api_stubs/_draft/_types.py

Copy file name to clipboardExpand all lines: src/array_api_stubs/_draft/_types.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@ class Info(Protocol):
110110
def capabilities(self) -> Capabilities:
111111
...
112112

113-
def default_device(self) -> device:
113+
def default_device(self) -> Device:
114114
...
115115

116-
def default_dtypes(self, *, device: Optional[device]) -> DefaultDataTypes:
116+
def default_dtypes(self, *, device: Optional[Device]) -> DefaultDataTypes:
117117
...
118118

119-
def devices(self) -> List[device]:
119+
def devices(self) -> List[Device]:
120120
...
121121

122122
def dtypes(
123-
self, *, device: Optional[device], kind: Optional[Union[str, Tuple[str, ...]]]
123+
self, *, device: Optional[Device], kind: Optional[Union[str, Tuple[str, ...]]]
124124
) -> DataTypes:
125125
...
126126

‎src/array_api_stubs/_draft/array_object.py

Copy file name to clipboardExpand all lines: src/array_api_stubs/_draft/array_object.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
__all__ = ["Array"]
44

5-
from typing import TYPE_CHECKING, Protocol, TypeVar
65
from enum import Enum
6+
from typing import TYPE_CHECKING, Protocol, TypeVar
7+
78
from .data_types import DType
89
from ._types import Device
910

@@ -311,7 +312,7 @@ def __dlpack__(
311312
self,
312313
/,
313314
*,
314-
stream: Any | None = None,
315+
stream: Any | None = None,
315316
max_version: tuple[int, int] | None = None,
316317
dl_device: tuple[Enum, int] | None = None,
317318
copy: bool | None = None,
@@ -370,7 +371,7 @@ def __dlpack__(
370371
dl_device: Optional[tuple[enum.Enum, int]]
371372
the DLPack device type. Default is ``None``, meaning the exported capsule
372373
should be on the same device as ``self`` is. When specified, the format
373-
must be a 2-tuple, following that of the return value of :meth:`array.__dlpack_device__`.
374+
must be a 2-tuple, following that of the return value of :meth:`Array.__dlpack_device__`.
374375
If the device type cannot be handled by the producer, this function must
375376
raise ``BufferError``.
376377
@@ -492,7 +493,7 @@ def __dlpack_device__(self, /) -> tuple[Enum, int]:
492493
493494
Returns
494495
-------
495-
device: Tuple[Enum, int]
496+
device: Tuple[enum.Enum, int]
496497
a tuple ``(device_type, device_id)`` in DLPack format. Valid device type enum members are:
497498
498499
::

‎src/array_api_stubs/_draft/creation_functions.py

Copy file name to clipboardExpand all lines: src/array_api_stubs/_draft/creation_functions.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def from_dlpack(
268268
269269
Notes
270270
-----
271-
See :meth:`array.__dlpack__` for implementation suggestions for `from_dlpack` in
271+
See :meth:`Array.__dlpack__` for implementation suggestions for `from_dlpack` in
272272
order to handle DLPack versioning correctly.
273273
274274
A way to move data from two array libraries to the same device (assumed supported by both libraries) in

‎src/array_api_stubs/_draft/info.py

Copy file name to clipboardExpand all lines: src/array_api_stubs/_draft/info.py
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
DataTypes,
1919
Capabilities,
2020
Info,
21+
Device,
2122
)
2223

2324

24-
def __array_namespace_info__() -> Info:
25+
def __array_namespace_info__() -> Info: # type: ignore[empty-body]
2526
"""
2627
Returns a namespace with Array API namespace inspection utilities.
2728
@@ -48,9 +49,10 @@ def __array_namespace_info__() -> Info:
4849
4950
.. versionadded: 2023.12
5051
"""
52+
...
5153

5254

53-
def capabilities() -> Capabilities:
55+
def capabilities() -> Capabilities: # type: ignore[empty-body]
5456
"""
5557
Returns a dictionary of array library capabilities.
5658
@@ -72,7 +74,7 @@ def capabilities() -> Capabilities:
7274
"""
7375

7476

75-
def default_device() -> device:
77+
def default_device() -> Device: # type: ignore[empty-body]
7678
"""
7779
Returns the default device.
7880
@@ -88,7 +90,7 @@ def default_device() -> device:
8890
"""
8991

9092

91-
def default_dtypes(
93+
def default_dtypes( # type: ignore[empty-body]
9294
*,
9395
device: Optional[device] = None,
9496
) -> DefaultDataTypes:
@@ -124,7 +126,7 @@ def default_dtypes(
124126
"""
125127

126128

127-
def dtypes(
129+
def dtypes( # type: ignore[empty-body]
128130
*,
129131
device: Optional[device] = None,
130132
kind: Optional[Union[str, Tuple[str, ...]]] = None,
@@ -179,7 +181,7 @@ def dtypes(
179181
"""
180182

181183

182-
def devices() -> List[device]:
184+
def devices() -> List[device]: # type: ignore[empty-body]
183185
"""
184186
Returns a list of supported devices which are available at runtime.
185187

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.