Cell Measures, Ancillary Variables, and Cell Methods lost when performing magic methods on cubes (e.g. `__iadd__`, `__div__`)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 53/100
Direzione di ricerca
Start in lib/iris/cube.py at the linked magic-method implementation, then trace how cube attributes, ancillary variables, and cell methods are handled during arithmetic. Check the single-cube array case as well as operations between cubes, and identify the relevant tests before changing behavior. Done means the applicable operations preserve metadata that remains valid and tests cover the cases reported.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
https://github.com/SciTools/iris/blob/2c05b4cc8e77c02748fd4caa2e46e49474408b31/lib/iris/cube.py#L155
I believe that 2 cubes cannot be added when their grids do not line up, so it is strange that common attributes like cell_area and ancillary variables like land_area_fraction are lost, and need to be manually added back in. Can this be fixed?
I have noticed the problem for __add__,__idiv__ and __div__ as well, and would guess that it applies to all magic operations on multiple cubes, whether in place (__iadd__,__imul__, __isub__, __idiv__ , and __itruediv__) or not (__add__,__mul__, __sub__, __div__ , and __truediv__)
I have also used __imul__ with an array of the same shape as the cube, which should implicitly only work because we assume the grid is the same, and cell_area is also lost! Furthermore, records of Cell Methods that were used (0 | time: mean) were also dropped.
Perhaps other attributes are getting dropped as well -- it would be good for someone to thoroughly check.
(FYI @valeriupredoi )
- Lingua principale
- Python
- Stelle
- 730
- Fork
- 323
- Merge medio
- 3g 21h
- PR unite (30g)
- 16
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi 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 SciTools/iris
-
Link Checker ReportForse già presa @stephenworsley l’ha presa 12 giorni fa. ApertaBot Type: Bug Type: Documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
SciTools/iris#7368 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
guess_bounds(yearly=True) fails on a single point, monthly=True worksForse già presa @pp-mo l’ha presa 47 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
SciTools/iris#7311 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Agentic
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di SciTools/iris
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
[Maintainer] task area:visualizer
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
RailtownAI/railtracks#1824 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
apache/datafusion#27688 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
heasarc/heasarc-tutorials#317 ·
-
bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
mloda-ai/mloda-registry#1664 ·
I maintainer di solito rispondono entro 1 giorno