MCPcopy Create free account
hub / github.com/cfgnunes/numerical-methods-python / example_interpolation_neville

Function example_interpolation_neville

main.py:304–319  ·  view source on GitHub ↗

Run an example 'Interpolation: Neville'.

()

Source from the content-addressed store, hash-verified

302
303@print_docstring
304def example_interpolation_neville():
305 """Run an example 'Interpolation: Neville'."""
306 x = np.array([1.0, 1.3, 1.6, 1.9, 2.2])
307 y = np.array([0.7651977, 0.6200860, 0.4554022, 0.2818186, 0.1103623])
308 x_int = 1.5
309
310 print("Inputs:")
311 print(f"x = {x}")
312 print(f"y = {y}")
313 print(f"x_int = {x_int}")
314
315 y_int, q = interpolation.neville(x, y, x_int)
316
317 print("Output:")
318 print(f"y_int = {y_int:.5f}")
319 print(f"q =\n{q}")
320
321
322@print_docstring

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected