def evaluate(self,       x, y, x_derivative=<NUM_LIT:0>, smooth=<NUM_LIT:0>, simple='<STR_LIT>'):
if simple=='<STR_LIT>': simple = self.simple<EOL>for n in range(<NUM_LIT:0>, len(self.y_values)-<NUM_LIT:1>):<EOL><INDENT>if self.y_values[n] <= y and self.y_values[n+<NUM_LIT:1>] >= y:<EOL><INDENT>y1 = self.y_values[n]<EOL>y2 = self.y_values[n+<NUM_LIT:1>]<EOL>z1 = self.x_splines[y1].evaluate(x, x_derivative, smooth, simple)<EOL>z2 = self.x_splines[y2].evaluate(x, x_derivative, smooth, simple)<EOL>return z1 + (y-y1)*(z2-z1)/(y2-y1)<EOL><DEDENT><DEDENT>print("<STR_LIT>"+str(y)+"<STR_LIT>")            <EOL>if y >= self.y_values[-<NUM_LIT:1>]: return self.x_splines[self.y_values[-<NUM_LIT:1>]].evaluate(x, x_derivative, smooth, simple)<EOL>else                     : return self.x_splines[self.y_values[<NUM_LIT:0>]].evaluate(x, x_derivative, smooth, simple)<EOL>
this evaluates the 2-d spline by doing linear interpolation of the curves