Skip to content

Instantly share code, notes, and snippets.

View shandysulen's full-sized avatar

Shandy Sulen shandysulen

View GitHub Profile
@shandysulen
shandysulen / gs.py
Created December 4, 2018 05:31
The following Gram-Schmidt orthogonalization procedure implementation is modified to use the city-block or manhattan-distance metric (instead of the typical Euclidean distance metric) so as to preserve the nature of any rational vectors input into the function.
import numpy as np
np.seterr(divide='ignore', invalid='ignore')
from numpy import linalg
from functools import reduce
from matplotlib import pyplot as plt
import matplotlib.image as mpimg
import urllib.request
def norm1(v):
"""