File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,14 @@ v0.11.0 (unreleased)
33
33
Breaking changes
34
34
~~~~~~~~~~~~~~~~
35
35
36
- - ``Dataset.T `` has been removed as a shortcut for :py:meth: `Dataset.transpose `.
37
- Call :py:meth: `Dataset.transpose ` directly instead.
38
- - Iterating over a ``Dataset `` now includes only data variables, not coordinates.
39
- Similarily, calling ``len `` and ``bool `` on a ``Dataset `` now
40
- includes only data variables
36
+ - Finished deprecation cycles:
37
+ - ``Dataset.T `` has been removed as a shortcut for :py:meth: `Dataset.transpose `.
38
+ Call :py:meth: `Dataset.transpose ` directly instead.
39
+ - Iterating over a ``Dataset `` now includes only data variables, not coordinates.
40
+ Similarily, calling ``len `` and ``bool `` on a ``Dataset `` now
41
+ includes only data variables.
42
+ - ``DataArray.__contains__ `` (used by Python's ``in `` operator) now checks
43
+ array data, not coordinates.
41
44
- Xarray's storage backends now automatically open and close files when
42
45
necessary, rather than requiring opening a file with ``autoclose=True ``. A
43
46
global least-recently-used cache is used to store open files; the default
Original file line number Diff line number Diff line change @@ -503,11 +503,7 @@ def _item_sources(self):
503
503
LevelCoordinatesSource (self )]
504
504
505
505
def __contains__ (self , key ):
506
- warnings .warn (
507
- 'xarray.DataArray.__contains__ currently checks membership in '
508
- 'DataArray.coords, but in xarray v0.11 will change to check '
509
- 'membership in array values.' , FutureWarning , stacklevel = 2 )
510
- return key in self ._coords
506
+ return key in self .data
511
507
512
508
@property
513
509
def loc (self ):
Original file line number Diff line number Diff line change @@ -618,9 +618,9 @@ def get_data():
618
618
da [dict (x = ind )] = value # should not raise
619
619
620
620
def test_contains (self ):
621
- data_array = DataArray (1 , coords = { 'x' : 2 } )
622
- with pytest . warns ( FutureWarning ):
623
- assert 'x' in data_array
621
+ data_array = DataArray ([ 1 , 2 ] )
622
+ assert 1 in data_array
623
+ assert 3 not in data_array
624
624
625
625
def test_attr_sources_multiindex (self ):
626
626
# make sure attr-style access for multi-index levels
@@ -2533,6 +2533,7 @@ def test_upsample_interpolate_regression_1605(self):
2533
2533
assert_allclose (actual , expected , rtol = 1e-16 )
2534
2534
2535
2535
@requires_dask
2536
+ @requires_scipy
2536
2537
def test_upsample_interpolate_dask (self ):
2537
2538
import dask .array as da
2538
2539
You can’t perform that action at this time.
0 commit comments