45
45
requires_pint ,
46
46
requires_sparse ,
47
47
source_ndarray ,
48
- InaccessibleArray ,
49
48
)
50
49
from xarray .tests .test_namedarray import NamedArraySubclassobjects
51
50
@@ -1667,7 +1666,8 @@ def __getitem__(self, key):
1667
1666
def __array_function__ (self , * args , ** kwargs ):
1668
1667
raise NotImplementedError (
1669
1668
"Not we don't want to use broadcast_to here "
1670
- "https://github.com/pydata/xarray/issues/9462" )
1669
+ "https://github.com/pydata/xarray/issues/9462"
1670
+ )
1671
1671
1672
1672
arr = ArrayWithoutBroadcastTo (np .zeros ((3 , 4 )))
1673
1673
# We should be able to add a new axis without broadcasting
@@ -1680,7 +1680,7 @@ def __array_function__(self, *args, **kwargs):
1680
1680
assert v_expanded .dims == ("z" , "x" , "y" )
1681
1681
assert v_expanded .shape == (1 , 3 , 4 )
1682
1682
1683
- # Explicitely asking for a shape of 1 triggers a different
1683
+ # Explicitly asking for a shape of 1 triggers a different
1684
1684
# codepath in set_dims
1685
1685
# https://github.com/pydata/xarray/issues/9462
1686
1686
v_expanded = v .set_dims (["z" , "x" , "y" ], shape = (1 , 3 , 4 ))
@@ -1713,7 +1713,6 @@ def __array_function__(self, *args, **kwargs):
1713
1713
with pytest .raises (NotImplementedError ):
1714
1714
v .set_dims (["z" , "x" , "y" ], shape = (2 , 3 , 4 ))
1715
1715
1716
-
1717
1716
def test_stack (self ):
1718
1717
v = Variable (["x" , "y" ], [[0 , 1 ], [2 , 3 ]], {"foo" : "bar" })
1719
1718
actual = v .stack (z = ("x" , "y" ))
0 commit comments