--

Sorry to nitpick, but numpy doesn't really end in the same loop, afaik. It vectorises each operation, and in your example it would most likely perform the %2, the ==0, and the **2 in three separate loops, each written in C.

--

--

Martin McBride
Martin McBride

Responses (1)