articles. r (np.ndarray): (N,) Radii. rmax (float): Radius which density is computed within. Returns: float: Average density enclosed within rmax. N)