numpy.hypot is faster and less memory consuming. Also applies to other occurences.