dustalov commited on
Commit
d40a816
1 Parent(s): d6fb3c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -127,7 +127,7 @@ def newman(wins: npt.NDArray[np.int64], ties: npt.NDArray[np.int64],
127
  )
128
 
129
  v = v_numerator / v_denominator
130
- v = np.nan_to_num(v, copy=False, nan=tolerance)
131
 
132
  pi_old = pi.copy()
133
 
@@ -144,7 +144,7 @@ def newman(wins: npt.NDArray[np.int64], ties: npt.NDArray[np.int64],
144
  )
145
 
146
  pi = pi_numerator / pi_denominator
147
- pi = np.nan_to_num(pi, copy=False, nan=tolerance)
148
 
149
  converged = np.allclose(pi / (pi + 1), pi_old / (pi_old + 1),
150
  rtol=tolerance, atol=tolerance) or (iterations >= limit)
 
127
  )
128
 
129
  v = v_numerator / v_denominator
130
+ v = np.nan_to_num(v, nan=tolerance)
131
 
132
  pi_old = pi.copy()
133
 
 
144
  )
145
 
146
  pi = pi_numerator / pi_denominator
147
+ pi = np.nan_to_num(pi, nan=tolerance)
148
 
149
  converged = np.allclose(pi / (pi + 1), pi_old / (pi_old + 1),
150
  rtol=tolerance, atol=tolerance) or (iterations >= limit)