Skip to content

Commit d83d77d

Browse files
committed
Improve convergence of lambertw for very large arguments
1 parent 8d56b2e commit d83d77d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pvlib/pvsystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1843,7 +1843,7 @@ def v_from_i(resistance_shunt, resistance_series, nNsVth, current,
18431843
# evaluation (above) results in NaN from overflow, 3 iterations
18441844
# of Newton's method gives approximately 8 digits of precision.
18451845
w = logargW
1846-
for i in range(0, 3):
1846+
for i in range(9):
18471847
w = w * (1 - np.log(w) + logargW) / (1 + w)
18481848
lambertwterm_log = w
18491849

0 commit comments

Comments
 (0)