Nitpick: I tend to prefer scipy's linalg instead of numpy's linalg (keeping the good habits in the codebase)