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
mimic xarray, with something like open and open_many, to avoid being forced to use lists
earthaccess.open only takes a list of results, so to open one granule, one must use results[0:1]; in addition, earthaccess.open returns a list, so one ends up with:
The text was updated successfully, but these errors were encountered:
What about having earthaccess.open() accept Granule | list[Granule]? Doesn't address the problem of the output being a list.
Or having earthaccess.open()only operate on a single thing, so if you want to open many you can use Python facilities to do so, e.g. [earthaccess.open(g) for g in results] . I personally really like this option.
I prefer open to open 1 thing, since that's how all other "open"s I'm familiar with work, but this would be a breaking change, so we need to take that into consideration. We should also make it a context manager.
mfisher87
changed the title
mimic xarray, with something like open and open_many, to avoid being forced to use listsearthaccess.open() usage unintuitive for single item
May 15, 2024
earthaccess.open
only takes a list of results, so to open one granule, one must useresults[0:1]
; in addition,earthaccess.open
returns a list, so one ends up with:The text was updated successfully, but these errors were encountered: