-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
The idea is to add a property to data objects to access the earthkit-utils patched array namespace of the objects. E.g.:
ds = ekd.from_source(f, "my.grib")
ds.array_namespace
ds[0].array_namespaceFor Xarray it should be available on the earthkit accessor:
r = ds.to_xarray()
r.earthkit.array_namespaceQuestions:
- do we need this property/method on the object? We could always use the
array_namespacemethod in earthkit-utils:
from earthkit.utils import array_namespace
array_namespace(ds)
array_namespace(ds[0])
array_namespace(r)
- use a method with arguments? With a method we could pass options for compound datatypes such as fieldlist/Xarray e.g. to check all fields/variables or just the first one.
- use a private property '_array_namespace`?
- add
array_backendtoo? We can get the namespace from the backend asarray_backend.namesapce
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response
Organisation
ECMWF
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request