code/starters/least_squares_lab.py
# STARTER: function bodies intentionally omitted.
"""A02.05: modified Gram-Schmidt QR for a small full-column-rank matrix."""
import math
def least_squares(a: list[list[float]], b: list[float], tolerance: float=1e-12) -> list[float]:
raise NotImplementedError('Implement least_squares from the contract in the book')
if __name__ == '__main__':
print(least_squares([[1.0, 0.0], [1.0, 1.0], [1.0, 2.0]], [1.0, 2.0, 2.0]))