use _lambertw_pvlib etc. by cwhanse · Pull Request #2732 · pvlib/pvlib-python
Seems like this warning is commonly (always?) emitted now:
pvlib-python\pvlib\ivtools\utils.py:563: RuntimeWarning: invalid value encountered in subtract
w = logx - np.log(logx) # initial guess, w = log(x) - log(log(x))
Here's a reproducer:
import pvlib cec = pvlib.pvsystem.retrieve_sam('cecmod') sdm_params = cec['Canadian_Solar_Inc__CS1U_400MS'] sdm_params = sdm_params[['alpha_sc', 'a_ref', 'I_L_ref', 'I_o_ref', 'R_sh_ref', 'R_s', 'Adjust']] sde_params = pvlib.pvsystem.calcparams_cec(1000, 25, **sdm_params) iv = pvlib.pvsystem.singlediode(*sde_params)