avoid linalg from numpy. Use scipy.linalg