Skip to content

Commit

Permalink
Merge pull request #800 from Unidata/dependabot-pip-ci-xarray-2024.10.0
Browse files Browse the repository at this point in the history
MNT: (deps): Bump xarray from 2023.8.0 to 2024.10.0 in /ci
  • Loading branch information
dcamron authored Nov 6, 2024
2 parents 5df42d0 + 103c7da commit d7ee03a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
1 change: 0 additions & 1 deletion ci/doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cartopy==0.22
matplotlib==3.9.2
metpy==1.6.3
pint==0.19
sphinx==5.2.3
sphinx_rtd_theme==1.0.0
sphinx-gallery==0.18.0
Expand Down
2 changes: 1 addition & 1 deletion ci/extra_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
xarray==2023.8.0
xarray==2024.10.0
18 changes: 5 additions & 13 deletions src/siphon/cdmr/xarray_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
from xarray import Variable
from xarray.backends.common import AbstractDataStore, BackendArray
from xarray.core import indexing

try:
from xarray.core.utils import FrozenDict
except ImportError:
from xarray.core.utils import FrozenOrderedDict as FrozenDict
from xarray.core.utils import FrozenDict

from . import Dataset

Expand All @@ -33,15 +29,11 @@ def get_array(self):

def __getitem__(self, item):
"""Wrap getitem around the data."""
item, np_inds = indexing.decompose_indexer(item, self.shape,
indexing.IndexingSupport.BASIC)
with self.datastore:
array = self.get_array()[item.tuple]

if len(np_inds.tuple) > 0:
array = indexing.NumpyIndexingAdapter(array)[np_inds]

return array
arr = self.get_array()
return indexing.explicit_indexing_adapter(item, self.shape,
indexing.IndexingSupport.BASIC,
arr.__getitem__)


class CDMRemoteStore(AbstractDataStore):
Expand Down

0 comments on commit d7ee03a

Please sign in to comment.