A C/Cython version will however probably be some factors faster still, as it requires fewer temporaries.
(Also, it is likely simpler to understand, as the operation is somewhat involved to vectorize.)