in utils/interpolation_base.py [0:0]
def __init__(self, energy: InterpolationEnergy, shape_array, interpolation_coeff):
super().__init__(energy)
assert (
all([coeff >= 0 for coeff in interpolation_coeff])
and sum(interpolation_coeff) == 1
), "interpolation coeffs need to prescribe a discrete probability distribution"
self.shape_array = shape_array
self.interpolation_coeff = interpolation_coeff
self.vert_new = Parameter(self.average_vertex(), requires_grad=True)