def project_to_sphere(points, center, radius):

    lengths = scipy.spatial.distance.cdist(points, np.array([center]))
    return (points - center) / lengths * radius + center
Projects the elements of points onto the sphere defined
dataset/ETHPy150Open scipy/scipy/scipy/spatial/_spherical_voronoi.py/project_to_sphere