def axis_proj(data, coordinate):
    """
    :param data: point cloud in Euclidean space
    :type data: 2D numpy array
    :param coordinate: which coordinate to project onto
    :type coordinate: integer greater than or equal to 0 and less than the dimension of the data
    :return: a function providing the projection of each point onto the specified coordinate
    """
    return (lambda i: data[i][coordinate])