mjhoptics / ray-optics

geometric ray tracing for optical systems
BSD 3-Clause "New" or "Revised" License
264 stars 54 forks source link

Spline function used in axisarrayfigure.py is deprecated for scipy version > 0.19 #5

Closed mudesire closed 4 years ago

mudesire commented 4 years ago

The function Spline in the axisarrayfigure.py can be replaced by:

from scipy import interpolate def Spline(x_p,y_p,x): return interpolate.splev(x, interpolate.splrep(x_p, y_p))

Source: spline is deprecated! spline is deprecated in scipy 0.19.0, use Bspline class instead. https://docs.scipy.org/doc/scipy-0.19.0/reference/generated/scipy.interpolate.spline.html

mjhoptics commented 4 years ago

Hello, sorry I didn't see your issue until now. I updated a fix for this using scipy.interpolate.interp1d on 9/24/19, commit f9f660c5fdaacb31707132f00257dbae51ecd880. Thanks for your comment.

mjhoptics commented 4 years ago

This should be resolved in the latest release on pypi, release 0.4.6. the final commit for this is 370259b6c0eea773dd8c51c114306764eb21af72