Remove unnecessary move to `numpy` space w/ slow `array` calls
@sadielbartholomew ci sta già lavorando.
Dal 4/4/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
The cf-plot code frequently calls the array attribute to extract some data array to store as a an variable and process using numpy operations, which is slow(er) because it bypasses the lazy and optimised Dask approach of cf-python for handling the underlying arrays, ultimately calling a compute to calculate the whole array at that point. Such calls to array and subsequent use of numpy operations is very often avoidable.
So, we should do a pass through of the code and survey as to cases where this is done, then convert them to stay in cf-python/dask space unless there is a very good reason not to. The ideal point to compute the underlying data array is at the end of the logical chain when the data is immediately required for the generation of the plot in being sent to a Cartopy or matplotlib method to make the appropriate marks on the image file. Calculating the array any earlier than this could well be unnecessary and degrade performance.
- Lingua principale
- Python
- Stelle
- 21
- Fork
- 11
- Merge medio
- 7h 11m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 NCAS-CMS/cf-plot
-
testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
-
Add `AGENTS.md` fileApertadocs enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
-
Add animation hooks into cf-plotForse di nuovo libera @bnlawrence l’ha presa 98 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
-
Ugly nemo plotting issueApertabug v35plus
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di NCAS-CMS/cf-plot
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Clean up dependabot noiseApertaTask
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
war-and-code/dircue#200 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno