Skip to content

Commit

Permalink
Issue ecmwf#470, by expanding the selection functionality to include …
Browse files Browse the repository at this point in the history
…NumPy arrays.
  • Loading branch information
alioacar committed Oct 3, 2024
1 parent e07af4f commit f952a24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/earthkit/data/core/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

def normalize_selection(*args, **kwargs):
from earthkit.data.arguments.transformers import ALL
from earthkit.data.utils.array import numpy_backend

_kwargs = {}
for a in args:
Expand All @@ -34,6 +35,7 @@ def normalize_selection(*args, **kwargs):
or callable(v)
or isinstance(v, (list, tuple, set, slice))
or isinstance(v, (str, int, float, datetime.datetime))
or numpy_backend()._is_native_array(v)
), f"Unsupported type: {type(v)} for key {k}"
return _kwargs

Expand Down

0 comments on commit f952a24

Please sign in to comment.