I mostly work with arrays in numpy but sometimes I get stuck with a problem that needs a for loop - only two things I can think of are parallelize the for loop or use numba/jax JIT functions and GPU acceleration.
Both don’t just work out of the box like Julia or MATLAB’s “parfor” loop, but seem to work well enough for non trivial for loop cases.
I mostly work with arrays in numpy but sometimes I get stuck with a problem that needs a for loop - only two things I can think of are parallelize the for loop or use numba/jax JIT functions and GPU acceleration.
Both don’t just work out of the box like Julia or MATLAB’s “parfor” loop, but seem to work well enough for non trivial for loop cases.