Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Aug 22, 2024
1 parent 32433b4 commit 084e59a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 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 @@ -199,8 +199,8 @@ def full(

def full_like(
x: NamedArray[_ShapeType, _DType],
fill_value: bool | int | float | complex,
/,
fill_value: bool | int | float | complex,
*,
dtype: _DType | None = None,
device: _Device | None = None,
Expand Down
12 changes: 8 additions & 4 deletions xarray/namedarray/_array_api/_data_type_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@
_dtype,
_FInfo,
_IInfo,
_Device,
_ShapeType,
)
from xarray.namedarray.core import (
NamedArray,
)
from xarray.namedarray.core import NamedArray


def astype(
x: NamedArray[_ShapeType, Any], dtype: _DType, /, *, copy: bool = True
x: NamedArray[_ShapeType, Any],
dtype: _DType,
/,
*,
copy: bool = True,
device: _Device | None = None,
) -> NamedArray[_ShapeType, _DType]:
"""
Copies an array to a specified data type irrespective of Type Promotion Rules rules.
Expand Down
5 changes: 3 additions & 2 deletions xarray/namedarray/_array_api/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@

def _maybe_default_namespace(xp: ModuleType | None = None) -> ModuleType:
if xp is None:
# import array_api_strict as xpd
import array_api_compat.numpy as xpd
import array_api_strict as xpd

# import array_api_compat.numpy as xpd

# import numpy as xpd

Expand Down

0 comments on commit 084e59a

Please sign in to comment.