ndsplines.make_interp_spline_from_tidy¶
-
ndsplines.
make_interp_spline_from_tidy
(tidy_data, input_vars, output_vars, degrees=3)¶ Construct an interpolating B-spline from a tidy data source. The tidy data source should be a complete matrix (see the
tidy_data
parameter description). The order of the input and output dimension of the constructed interpolant will be the same as theinput_vars
andoutput_vars
arguments, following the convention of input variables first.Parameters: - tidy_data (array_like, shape (num_points, xdim + ydim)) – Pandas DataFrame or NumPy Array of data. In order to be a complete matrix, we must have num_points = prod( nunique(input_var) for input_var in input_vars) Any missing or extra data will cause an error on reshape.
- input_vars (iterable) – Column names (for DataFrame) or indices (for np.ndarray) for input variables.
- output_vars (iterable) – Column names (for DataFrame) or indices (for np.ndarray) for output variables.
- degrees (ndarray, shape=(ndim,), dtype=np.intc) – Degree of interpolant for each axis (or broadcastable). Optional, default is 3.
Returns: b – An interpolating NDSpline.
Return type: NDSpline object
See also