Skip to content

Commit

Permalink
Update _creation_functions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Aug 25, 2024
1 parent 7eceb10 commit 9618f2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xarray/namedarray/_array_api/_creation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def meshgrid(*arrays: NamedArray, indexing: str = "xy") -> list[NamedArray]:
def ones(
shape: _Shape, *, dtype: _DType | None = None, device: _Device | None = None
) -> NamedArray[_ShapeType, _DType]:
return full(shape, 1, dtype=dtype, device=device)
return full(shape, 1.0, dtype=dtype, device=device)


def ones_like(
Expand Down Expand Up @@ -287,7 +287,7 @@ def triu(
def zeros(
shape: _Shape, *, dtype: _DType | None = None, device: _Device | None = None
) -> NamedArray[_ShapeType, _DType]:
return full(shape, 0, dtype=dtype, device=device)
return full(shape, 0.0, dtype=dtype, device=device)


def zeros_like(
Expand Down

0 comments on commit 9618f2a

Please sign in to comment.