Skip to content

Instantly share code, notes, and snippets.

View CuyiGuaton's full-sized avatar
💭
UwU

Sergio Salinas CuyiGuaton

💭
UwU
  • Santiago, Chile
View GitHub Profile
@melpomene
melpomene / lagrange.py
Created April 24, 2012 19:27
Lagrange interpolation in python
import numpy as np
import matplotlib.pyplot as plt
import sys
def main():
if len(sys.argv) == 1 or "-h" in sys.argv or "--help" in sys.argv:
print "python lagrange.py <x1.y1> .. <x_k.y_k>"
print "Example:"
print "python lagrange.py 0.1 2.4 4.5 3.2"