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 a3f47a9 commit 3cebb62
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 @@ -281,7 +281,7 @@ def tril(
x: NamedArray[_ShapeType, _DType], /, *, k: int = 0
) -> NamedArray[_ShapeType, _DType]:
xp = _get_data_namespace(x)
_data = xp.tril(x._data, dtype=x.dtype)
_data = xp.tril(x._data, k=k)
# TODO: Can probably determine dim names from x, for now just default names:
_dims = _infer_dims(_data.shape)
return x._new(_dims, _data)
Expand All @@ -291,7 +291,7 @@ def triu(
x: NamedArray[_ShapeType, _DType], /, *, k: int = 0
) -> NamedArray[_ShapeType, _DType]:
xp = _get_data_namespace(x)
_data = xp.triu(x._data, dtype=x.dtype)
_data = xp.triu(x._data, k=k)
# TODO: Can probably determine dim names from x, for now just default names:
_dims = _infer_dims(_data.shape)
return x._new(_dims, _data)
Expand Down

0 comments on commit 3cebb62

Please sign in to comment.