code: def test_regression_arpackng_1315():
      # Check that issue arpack-ng/#1315 is not present.
      # Adapted from arpack-ng/TESTS/bug_1315_single.c
      # If this fails, then the installed ARPACK library is faulty.
  
      for dtype in [np.float32, np.float64]:
          np.random.seed(1234)
  
          w0 = np.arange(1, 1000 + 1).astype(dtype)
          A = diags([w0], [0], shape=(1000, 1000))
  
          v0 = np.random.rand(1000).astype(dtype)
          w, v = eigs(A, k=9, ncv=2 * 9 + 1, which="LM", v0=v0)
  
          assert_allclose(np.sort(w), np.sort(w0[-9:]), rtol=1e-4)
  
imports: import threading
  import itertools
  import sys
  import platform
  import numpy
  from numpy.testing import assert_allclose, assert_array_almost_equal_nulp, assert_equal, assert_array_equal, suppress_warnings
  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
label_desc: Use image node_id 39 for calling a global function with example usage: test_regression_arpackng_1315() without return types