Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/array_api_stubs/_draft/creation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def linspace(
"""


def meshgrid(*arrays: array, indexing: Literal["xy", "ij"] = "xy") -> List[array]:
def meshgrid(*arrays: array, indexing: Literal["xy", "ij"] = "xy") -> Tuple[array, ...]:
"""
Returns coordinate matrices from coordinate vectors.

Expand All @@ -464,8 +464,8 @@ def meshgrid(*arrays: array, indexing: Literal["xy", "ij"] = "xy") -> List[array

Returns
-------
out: List[array]
list of N arrays, where ``N`` is the number of provided one-dimensional input arrays. Each returned array must have rank ``N``. For ``N`` one-dimensional arrays having lengths ``Ni = len(xi)``,
out: Tuple[array, ...]
tuple of N arrays, where ``N`` is the number of provided one-dimensional input arrays. Each returned array must have rank ``N``. For ``N`` one-dimensional arrays having lengths ``Ni = len(xi)``,

- if matrix indexing ``ij``, then each returned array must have the shape ``(N1, N2, N3, ..., Nn)``.
- if Cartesian indexing ``xy``, then each returned array must have shape ``(N2, N1, N3, ..., Nn)``.
Expand Down
8 changes: 4 additions & 4 deletions src/array_api_stubs/_draft/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,19 @@ def dtypes(
"""


def devices() -> List[device]:
def devices() -> Tuple[device, ...]:
"""
Returns a list of supported devices which are available at runtime.

Returns
-------
out: List[device]
a list of supported devices.
out: Tuple[device, ...]
tuple containing a list of supported devices.

Notes
-----

- Each device object (see :ref:`device-support`) in the list of returned devices **must** be an object which can be provided as a valid keyword-argument to array creation functions.
- Each device object (see :ref:`device-support`) in the tuple of returned devices **must** be an object which can be provided as a valid keyword-argument to array creation functions.

Notes
-----
Expand Down
6 changes: 3 additions & 3 deletions src/array_api_stubs/_draft/manipulation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ._types import List, Optional, Tuple, Union, array


def broadcast_arrays(*arrays: array) -> List[array]:
def broadcast_arrays(*arrays: array) -> Tuple[array, ...]:
"""
Broadcasts one or more arrays against one another.

Expand All @@ -30,8 +30,8 @@ def broadcast_arrays(*arrays: array) -> List[array]:

Returns
-------
out: List[array]
a list of broadcasted arrays. Each array **must** have the same shape. Each array **must** have the same dtype as its corresponding input array.
out: Tuple[array, ...]
tuple of broadcasted arrays. Each array **must** have the same shape. Each array **must** have the same dtype as its corresponding input array.
"""


Expand Down