@register_jitable
def _get_rank_from_singular_values(sv, t):
 rank = 0
 for k in range(len(sv)):
  if (sv[k] > t):
   rank = (rank + 1)
  else:
   break
 return rank

@ register_jitable def _get_rank_from_singular_values ( sv , t ) : rank = 0 for k in range ( len ( sv ) ) : if ( sv [ k ] > t ) : rank = ( rank + 1 ) else : break return rank
gets rank from singular values with cut-off at a given tolerance .