You can get the element-wise square of an input with np.square(). This is not exactly the same as x**2.
The unofficial guide to np.random.uniform()
Everything you ever wanted to know about the numpy square root operation…
You can do vectorized pairwise distance calculations in NumPy (without using SciPy). This lets you extend pairwise computations to other kinds of functions.