code: def __init__(self):
      self.eigs = eigs
      self.which = ["LM", "LR", "LI"]  # , 'SM', 'LR', 'SR', 'LI', 'SI']
      self.mattypes = [csr_matrix, aslinearoperator, np.asarray]
      self.sigmas_OPparts = {
          None: [None],
          0.1: ["r"],
          0.1 + 0.1j: ["r", "i"],
      }
  
      # generate matrices
      # these should all be float32 so that the eigenvalues
      # are the same in float32 and float64
      N = 6
      np.random.seed(2300)
      Ar = generate_matrix(N).astype("f").astype("d")
      M = (
          generate_matrix(N, hermitian=True, pos_definite=True)
          .astype("f")
          .astype("d")
      )
      Ac = generate_matrix(N, complex=True).astype("F").astype("D")
      v0 = np.random.random(N)
  
      # standard real nonsymmetric problem
      SNR = DictWithRepr("std-real-nonsym")
      SNR["mat"] = Ar
      SNR["v0"] = v0
      SNR["eval"] = eig(SNR["mat"], left=False, right=False)
  
      # general real nonsymmetric problem
      GNR = DictWithRepr("gen-real-nonsym")
      GNR["mat"] = Ar
      GNR["bmat"] = M
      GNR["v0"] = v0
      GNR["eval"] = eig(
          GNR["mat"], GNR["bmat"], left=False, right=False
      )
  
      # standard complex nonsymmetric problem
      SNC = DictWithRepr("std-cmplx-nonsym")
      SNC["mat"] = Ac
      SNC["v0"] = v0
      SNC["eval"] = eig(SNC["mat"], left=False, right=False)
  
      # general complex nonsymmetric problem
      GNC = DictWithRepr("gen-cmplx-nonsym")
      GNC["mat"] = Ac
      GNC["bmat"] = M
      GNC["v0"] = v0
      GNC["eval"] = eig(
          GNC["mat"], GNC["bmat"], left=False, right=False
      )
  
      self.real_test_cases = [SNR, GNR]
      self.complex_test_cases = [SNC, GNC]
  
imports: from __future__ import division, print_function, absolute_import
  import threading
  import itertools
  import numpy
  from numpy.testing import assert_allclose, assert_array_almost_equal_nulp, assert_equal, assert_array_equal
  from pytest import raises
  import pytest
  from numpy import dot, conj, random
  from scipy.linalg import eig, eigh, hilbert, svd
  from scipy.sparse import csc_matrix, csr_matrix, isspmatrix, diags, rand
  from scipy.sparse.linalg import LinearOperator, aslinearoperator
  from scipy.sparse.linalg.eigen.arpack import eigs, eigsh, svds, ArpackNoConvergence, arpack
  from scipy._lib._gcutils import assert_deallocated, IS_PYPY
  from scipy._lib._numpy_compat import suppress_warnings
label_desc: Use image node_id 1 to create a new NonSymmetricParams object  with example: obj = NonSymmetricParams()