I am trying to use scipy.sparse.linalg.eigsh with fixed seed.
In order to that, I need to specify the v0 parameter. However, I am unable to figure out what exactly needs to go into v0, as the documentation is very meagre here (it merely says numpy.ndarray) and the error message is not informative for me.
Code:
import numpy as np
import scipy.sparse.linalg
A = scipy.sparse.rand(10,10)
# v0 = np.random.rand(10,10)
v0 = np.random.rand(10,5)
w, v = scipy.sparse.linalg.eigsh(A, k=5, v0=v0)
Error:
error: failed in converting 10th argument `workd' of _arpack.dsaupd to C/Fortran array