Is there any way to include external scipy python functions when defining systems of equations in PyCont? I want to make one of the state variables in my continuation a function of a spline, computed using the UnivariateSpline from sci.interpolate.

The code I'm using to define the system looks like this:

pred_spline = scipy.interpolate.UnivariateSpline(x,y,s=0)

DSargs.varspecs = { 'N': '(delta * (Nin - N) - (pred_spline(N) * D))',

'D': '(pred_spline(N) * D) - (delta * D))' }

However, all I get is this error:

Undeclared or illegal token `scipy` in spec string `pred_spline`

I'm not sure how to proceed from here.

Regards,

Eric