Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

smooth interpolation python

>>> from scipy.interpolate import UnivariateSpline
>>> x, y = np.array([1, 2, 3, 4]), np.array([1, np.nan, 3, 4])
>>> w = np.isnan(y)
>>> y[w] = 0.
>>> spl = UnivariateSpline(x, y, w=~w)
Source by docs.scipy.org #
 
PREVIOUS NEXT
Tagged: #smooth #interpolation #python
ADD COMMENT
Topic
Name
9+9 =