Foundations-of-Applied-Mathematics / Labs

Labs for the Foundations of Applied Mathematics curriculum.
https://foundations-of-applied-mathematics.github.io/
211 stars 71 forks source link

QR Decomposition - pdf #21

Closed cnoorda2 closed 2 years ago

cnoorda2 commented 2 years ago

There is a typo in the Additional Material section regarding complex QR decomposition. As I was working to apply the changes, I think I found that the defined sign(x) function might be incorrect. I believe it should be sign = lambda x: x/np.abs(x) if x!=0 else 1 instead of sign = lambda x: 1 if np.real(x) >= 0 else -1.