zonal_mean() and weighted_mean() should return the same type of object
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
Direzione di ricerca
Inizia eseguendo la MCVE fornita con UxDataArray.zonal_mean() e weighted_mean(), quindi individua le implementazioni di entrambi i metodi e confronta il modo in cui costruiscono i risultati. Conferma quale tipo restituito il progetto prevede per i risultati senza dimensioni della griglia e aggiungi o aggiorna la copertura in modo che entrambi i metodi restituiscano coerentemente quel tipo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version
v2026.08.1
How did you install UXarray?
Source
What happened?
When calling UxDataArray.zonal_mean(), the output is an xarray.DataArray.
When calling UxDataArray.weighted_mean(), the output is a UxDataArray.
What did you expect to happen?
I expected these two functions to return the same type of object.
My guess is that both methods should return an xarray.DataArray because the result no longer contains any grid dimensions, and I've been thinking of "the data lives on the grid" as a core principle of UxDataArray and UxDataset objects. But, maybe that is wrong, and it should be UxDataArray for some reason?
Either way, I would definitely expect them to either both return xarray.DataArray objects or both return UxDataArray objects, because both functions produce results without any grid dimension.
Can you provide a MCVE to repoduce the bug?
import uxarray as ux
arr = ux.tutorial.open_dataset('quad-hexagon')['t2m']
arr.zonal_mean() # this is an xarray.DataArray
arr.weighted_mean() # this is a UxDataArray
- Lingua principale
- Python
- Stelle
- 228
- Fork
- 55
- Merge medio
- 5g 1h
- PR unite (30g)
- 14
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di UXARRAY/uxarray
-
developer experience
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
new feature visualization
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Tutte le issue di UXARRAY/uxarray
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100