code: def __init__(
      self,
      n,
      k,
      tp,
      mode=1,
      sigma=None,
      ncv=None,
      v0=None,
      maxiter=None,
      which="LM",
      tol=0,
  ):
      if k <= 0:
          raise ValueError("k must be positive, k=%d" % k)
  
      if maxiter is None:
          maxiter = n * 10
      if maxiter <= 0:
          raise ValueError(
              "maxiter must be positive, maxiter=%d" % maxiter
          )
  
      if tp not in "fdFD":
          raise ValueError("matrix type must be 'f', 'd', 'F', or 'D'")
  
      if v0 is not None:
          # ARPACK overwrites its initial resid,  make a copy
          self.resid = np.array(v0, copy=True)
          info = 1
      else:
          # ARPACK will use a random initial vector.
          self.resid = np.zeros(n, tp)
          info = 0
  
      if sigma is None:
          # sigma not used
          self.sigma = 0
      else:
          self.sigma = sigma
  
      if ncv is None:
          ncv = choose_ncv(k)
      ncv = min(ncv, n)
  
      self.v = np.zeros((n, ncv), tp)  # holds Ritz vectors
      self.iparam = np.zeros(11, arpack_int)
  
      # set solver mode and parameters
      ishfts = 1
      self.mode = mode
      self.iparam[0] = ishfts
      self.iparam[2] = maxiter
      self.iparam[3] = 1
      self.iparam[6] = mode
  
      self.n = n
      self.tol = tol
      self.k = k
      self.maxiter = maxiter
      self.ncv = ncv
      self.which = which
      self.tp = tp
      self.info = info
  
      self.converged = False
      self.ido = 0
  
imports: import numpy
  import warnings
  from scipy.sparse.linalg._interface import aslinearoperator, LinearOperator
  from scipy.sparse import eye, issparse
  from scipy.linalg import eig, eigh, lu_factor, lu_solve
  from scipy.sparse._sputils import isdense, is_pydata_spmatrix
  from scipy.sparse.linalg import gmres, splu
  from scipy._lib._util import _aligned_zeros
  from scipy._lib._threadsafety import ReentrancyLock
  from .None import _arpack
label_desc: Use image node_id 1 to create a new _ArpackParams object  with example: obj = _ArpackParams(n, k, tp, mode, sigma, ncv, v0, maxiter, which, tol)