Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Remove unnecessary move to `numpy` space w/ slow `array` calls

Abierto
#92 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@sadielbartholomew ya está trabajando en esto.

Desde el 4/4/2025.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

enhancement performance

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.

Lenguaje dominante
Python
Estrellas
21
Forks
11
Merge medio
7 h 11 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NCAS-CMS/cf-plot

Todos los issues de NCAS-CMS/cf-plot

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.