def METHOD_NAME(m):
    """
    Compute angular distances between all the pairs of points.
    """
    # Get index of upper triangular to avoid double counting
    idx = np.triu_indices(m.shape[0], k=1)
    # compute the magnitude of each vector
    magnitudes = np.linalg.norm(m, axis=1)
    # compute the dot product between all pairs of vectors using np.matmul function, which is
    # more efficient than np.dot for large matrices; and divide the dot product matrix by the
    # product of the magnitudes to get the cosine of the angle
    cos_angles = np.matmul(m, m.T)[idx] / np.outer(magnitudes, magnitudes)[idx]
    # clip the cosine values to the range [-1, 1] to avoid any numerical errors and compute angles
    return np.arccos(np.clip(cos_angles, -1, 1))