Skip to content

Commit

Permalink
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xarray
Browse files Browse the repository at this point in the history
 into add_array_api_mean
  • Loading branch information
Illviljan committed Aug 19, 2024
2 parents a0489f0 + 8098fa3 commit ab828a2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion xarray/namedarray/_array_api/_creation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import numpy as np

from xarray.namedarray._array_api._utils import (
_maybe_default_namespace,
_get_data_namespace,
_maybe_default_namespace,
)
from xarray.namedarray._typing import (
Default,
Expand Down
15 changes: 8 additions & 7 deletions xarray/namedarray/_array_api/_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@

if TYPE_CHECKING:
from types import ModuleType
from typing import Optional, Union, Tuple, List
from typing import Optional, Union

from xarray.namedarray._typing import _Device

from xarray.namedarray._array_api._dtypes import (
bool,
complex64,
complex128,
float32,
float64,
int8,
int16,
int32,
Expand All @@ -17,10 +22,6 @@
uint16,
uint32,
uint64,
float32,
float64,
complex64,
complex128,
)


Expand Down Expand Up @@ -60,7 +61,7 @@ def default_dtypes(
def dtypes(
*,
device: _Device | None = None,
kind: Union[str, Tuple[str, ...]] | None = None,
kind: str| Tuple[str, ...] | None = None,
) -> dict:
if kind is None:
return {
Expand Down Expand Up @@ -138,7 +139,7 @@ def dtypes(
raise ValueError(f"unsupported kind: {kind!r}")


def devices() -> List[_Device]:
def devices() -> list[_Device]:
return [default_device()]


Expand Down
3 changes: 1 addition & 2 deletions xarray/namedarray/_array_api/_manipulation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

from typing import Any

from xarray.namedarray._array_api._utils import _get_data_namespace
from xarray.namedarray._array_api._creation_functions import asarray

from xarray.namedarray._array_api._utils import _get_data_namespace
from xarray.namedarray._typing import (
Default,
_arrayapi,
Expand Down

0 comments on commit ab828a2

Please sign in to comment.