diff --git a/docs/sphinx/source/whatsnew/v0.4.2.txt b/docs/sphinx/source/whatsnew/v0.4.2.txt index 4f46308b01..8c8bf8fd32 100644 --- a/docs/sphinx/source/whatsnew/v0.4.2.txt +++ b/docs/sphinx/source/whatsnew/v0.4.2.txt @@ -44,6 +44,9 @@ Enhancements * Added name attribute to ModelChain and PVSystem. (:issue:`254`) * Restructured API section of the documentation so that there are separate pages for each function, class, or method. (:issue:`258`) +<<<<<<< HEAD +* Improved convergence of lambertw function (:issue: '260') +======= * Improved Linke turbidity factor time interpolation with Python `calendar` month days and leap years (:issue:`265`) @@ -52,6 +55,7 @@ Other ~~~~~ * Typical modeling results could change by ~1%, depending on location, if they depend on the turbidity table +>>>>>>> refs/remotes/pvlib/master Code Contributors @@ -60,4 +64,8 @@ Code Contributors * Uwe Krien * Will Holmgren * Volker Beutner +<<<<<<< HEAD +* Cliff Hansen +======= * Mark Mikofski +>>>>>>> refs/remotes/pvlib/master diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index ba64fc200b..47dfbcabec 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -1843,7 +1843,8 @@ def v_from_i(resistance_shunt, resistance_series, nNsVth, current, # evaluation (above) results in NaN from overflow, 3 iterations # of Newton's method gives approximately 8 digits of precision. w = logargW - for i in range(0, 3): + order = np.ceil(np.log10(w)).astype(int) + for i in range(0, 3*order): w = w * (1 - np.log(w) + logargW) / (1 + w) lambertwterm_log = w