elementwise_norm¶
- halotools.utils.elementwise_norm(x)[source]¶
Calculate the normalization of each element in a list of n-dimensional points.
- Parameters:
- xndarray
Numpy array of shape (npts, ndim) storing a collection of n-dimensional points
- Returns:
- resultndarray
Numpy array of shape (npts, ) storing the norm of each n-dimensional point in x.
Examples
>>> npts = int(1e3) >>> ndim = 3 >>> x = np.random.random((npts, ndim)) >>> norms = elementwise_norm(x)