Skip to content

Commit

Permalink
Add array_namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Sep 15, 2023
1 parent fb2ca4d commit cf91823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ def __init__(self):
def __array_function__(self, *args, **kwargs):
pass

def __array_namespace__(self, *args, **kwargs):
pass

def __repr__(self):
return "Custom\nArray"

Expand Down
5 changes: 1 addition & 4 deletions xarray/tests/test_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,7 @@ def _repr_inline_(self, width):

return formatted

def __array_function__(self, *args, **kwargs):
return NotImplemented

def __array_ufunc__(self, *args, **kwargs):
def __array_namespace__(self, *args, **kwargs):
return NotImplemented

@property
Expand Down

0 comments on commit cf91823

Please sign in to comment.