I'm inverting very large matrices on an HPC. Obviously, this has high RAM requirements. To avoid out-of-memory errors, as a temporary solution I've just been requesting a lot of memory (TBs). How might I predict the required memory from the input matrix size for a matrix inversion using numpy.linalg.inv to more efficiently run HPC jobs?