code: def _safe_downcast_indices(A):
      # check for safe downcasting
      max_value = np.iinfo(np.intc).max
  
      if (
          A.indptr[-1] > max_value
      ):  # indptr[-1] is max b/c indptr always sorted
          raise ValueError("indptr values too large for SuperLU")
  
      if max(*A.shape) > max_value:  # only check large enough arrays
          if np.any(A.indices > max_value):
              raise ValueError("indices values too large for SuperLU")
  
      indices = A.indices.astype(np.intc, copy=False)
      indptr = A.indptr.astype(np.intc, copy=False)
      return indices, indptr
  
file_path: scipy/scipy/sparse/linalg/_dsolve/linsolve.py
imports: from warnings import warn
  import numpy
  from numpy import asarray
  from scipy.sparse import issparse, SparseEfficiencyWarning, csc_matrix, csr_matrix
  from scipy.sparse._sputils import is_pydata_spmatrix
  from scipy.linalg import LinAlgError
  import copy
  from .None import _superlu
label_desc: Use image node_id 3 for calling a global function with example usage: _safe_downcast_indices(A) and returns: indices,  indptr