Trouble using Apache Common Maths module

I am using the Ignition Viewer app trying to get the Apache Common Maths Spline Interpolator to work within the scripting editor. This will eventually be used with a corresponding data set. This is the code we have to try it for simplicity purposes (to output the function result to a message box), but not sure what we are missing, given that the interpolate function asks for 2 args, not 3.

I think the issue is that you’re trying to call interpolate as if it were a statically defined function on SplineInterpolator, and it’s not - you need to create an instance of it and then call the method on that instance.

Yeah, it looks like psf = SplineInterpolator().interpolate(x, y) should work fine. The ‘missing third argument’ is probably self, because of the way Python/Jython does instance methods on classes.