I need to calculate the determinant of a large 1554,1554 matrix of values with single precision in python. In doing so I encounter a runtime warning:
import numpy as np
from numpy import linalg as LA
a = np.random.random((1554, 1554))
b = np.random.random((1554, 1554))
c = np.dot(a,b)
det = LA.det(c)
RuntimeWarning: overflow encountered in det r = _umath_linalg.det(a, signature=signature)
Any ideas on how I can work around this problem? Many thanks!
Edit: this question is unique in that it specifically refers to computing the determinant of large matrix in double precision, though a possible answer is included here: Can I get the matrix determinant using Numpy?