3 ms·
I aknowledged it, see the "Edit" at the end ;) In your case reaching to numpy was probably the best you could do, as it abstracts and solves many things. Using
by dr_zoidberg 11y ago
I aknowledged it, see the "Edit" at the end ;)
In your case reaching to numpy was probably the best you could do, as it abstracts and solves many things. Using properly "vectorized" numpy is also a big plus for readability.
I just wanted to mention a few things regarding the "pure python optimization" views which could help in cases where you're not writing numerical code that won't benefit from numpy.