You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added support for NumPy scalars by checking if the item has an 'item' method and calling it when applicable.
- Converted non-scalar NumPy arrays to lists to ensure consistent handling in the selection process.
alioacar
added a commit
to alioacar/earthkit-data
that referenced
this issue
Oct 3, 2024
Hi, I believe the issue lies within the Selection class in index.py. The item and shape methods can be utilized to determine whether the variable is a np scalar or an array.
Is your feature request related to a problem? Please describe.
At the moment
sel()
does not accept numpy types. So while this works:this call gives empty result:
Describe the solution you'd like
Allow using numpy types in sel.
Describe alternatives you've considered
No response
Additional context
No response
Organisation
ECMWF
The text was updated successfully, but these errors were encountered: