Rodolphe_Lampe:

By profiling my code, I seed that these formulation as a list comprehension might be problematic in term of speed.


Very unlikely, unless you have thousands of transformations on tiny arrays. In normal circumstances, your hotspots should be in native (c++ or cuda); this may be invisible to your profiler, or you’re doing profiling without cuda synchronization.