original_docstring: Compute the level number variance of the current unfolded eigenvalues.
  
      Parameters
      ----------
      L: ndarray
          The grid of L values for which to compute the level variance.
  
      tol: float
          Stop iterating when the last `min_L_iters` computed values of the
          level variance have a range (i.e. max - min) < tol.
  
      max_L_iters: int
          Stop computing values for the level variance once max_L_iters values
          have been computed for each L value.
  
      min_L_iters: int
          Minimum number of iterations for each L value.
  
      progress: bool
          Whether or not to display computation progress in stdout.
  
      Returns
      -------
      L_vals: ndarray
          The L_values for which the number level variance was computed.
  
      sigma: ndarray
          The computed number level variance values.
      
docstring: Compute the level number variance of the current unfolded eigenvalues.
  Parameters
  
  ndarray
  The grid of L values for which to compute the level variance.
  
  float
  Stop iterating when the last `min_L_iters` computed values of the
  level variance have a range  < tol.
  
  int
  Stop computing values for the level variance once max_L_iters values
  have been computed for each L value.
  
  int
  Minimum number of iterations for each L value.
  
  bool
  Whether or not to display computation progress in stdout.
  
  Returns
  
  ndarray
  The L_values for which the number level variance was computed.
  
  ndarray
  The computed number level variance values.
docstring_tokens: Compute the level number variance of the current unfolded eigenvalues . Parameters ndarray The grid of L values for which to compute the level variance . float Stop iterating when the last ` min_L_iters ` computed values of the level variance have a range < tol . int Stop computing values for the level variance once max_L_iters values have been computed for each L value . int Minimum number of iterations for each L value . bool Whether or not to display computation progress in stdout . Returns ndarray The L_values for which the number level variance was computed . ndarray The computed number level variance values .
code: def _sigma_iter_converge(
      unfolded: ndarray,
      L: ndarray,
      tol: float,
      max_L_iters: int,
      min_L_iters: int,
      progress: ndarray,
  ) -> Tuple[ndarray, ndarray]:
      """Compute the level number variance of the current unfolded eigenvalues.
  
      Parameters
      ----------
      L: ndarray
          The grid of L values for which to compute the level variance.
  
      tol: float
          Stop iterating when the last `min_L_iters` computed values of the
          level variance have a range (i.e. max - min) < tol.
  
      max_L_iters: int
          Stop computing values for the level variance once max_L_iters values
          have been computed for each L value.
  
      min_L_iters: int
          Minimum number of iterations for each L value.
  
      progress: bool
          Whether or not to display computation progress in stdout.
  
      Returns
      -------
      L_vals: ndarray
          The L_values for which the number level variance was computed.
  
      sigma: ndarray
          The computed number level variance values.
      """
      # the copy and different variable is needed here in the parallel context
      # https://github.com/numba/numba/issues/3652
      L_vals = np.copy(L)
      sigma = np.empty(L_vals.shape, dtype=np.float64)
      for i in prange(L_vals.shape[0]):
          # tol_modified = tol + tol * (L[i] / 5.0)
          tol_modified = tol
          sigma[i] = _sigma_iter_converge_L(
              unfolded, L_vals[i], tol_modified, max_L_iters, min_L_iters
          )
          if progress is not None:
              progress[0] += 1
      return L_vals, sigma
code_tokens: def _sigma_iter_converge ( unfolded : ndarray , L : ndarray , tol : float , max_L_iters : int , min_L_iters : int , progress : ndarray , ) -> Tuple [ ndarray , ndarray ] : L_vals = np . copy ( L ) sigma = np . empty ( L_vals . shape , dtype = np . float64 ) for i in prange ( L_vals . shape [ 0 ] ) : tol_modified = tol sigma [ i ] = _sigma_iter_converge_L ( unfolded , L_vals [ i ] , tol_modified , max_L_iters , min_L_iters ) if progress is not None : progress [ 0 ] += 1 return L_vals , sigma
short_docstring: Compute the level number variance of the current unfolded eigenvalues.
short_docstring_tokens: Compute the level number variance of the current unfolded eigenvalues .
comment: """Compute the level number variance of the current unfolded eigenvalues.
  
      Parameters
      ----------
      L: ndarray
          The grid of L values for which to compute the level variance.
  
      tol: float
          Stop iterating when the last `min_L_iters` computed values of the
          level variance have a range (i.e. max - min) < tol.
  
      max_L_iters: int
          Stop computing values for the level variance once max_L_iters values
          have been computed for each L value.
  
      min_L_iters: int
          Minimum number of iterations for each L value.
  
      progress: bool
          Whether or not to display computation progress in stdout.
  
      Returns
      -------
      L_vals: ndarray
          The L_values for which the number level variance was computed.
  
      sigma: ndarray
          The computed number level variance values.
      """$SEP$# the copy and different variable is needed here in the parallel context$SEP$# https://github.com/numba/numba/issues/3652$SEP$# tol_modified = tol + tol * (L[i] / 5.0)