scipy v1.15.0 (Jan 2025) offers two new element-wise optimization functions: scipy.optimize.elementwise.find_root and scipy.optimize.elementwise.find_minimum. (See previous brief discussion of this scipy functionality in #974).
These functions can likely provide significant speed-ups for single-diode equation calculations. For example, rerunning the benchmark in #974 (comment) using the new find_root function gives this timing comparison for bishop88_i_from_v ("chandrupatla" is the new scipy function):
The find_minimum function could likely speed up the lambertw approach as well, although I have not benchmarked it against our _golden_sect_DataFrame function.
The question is: when can we start using these in pvlib? The required scipy version is quite new, and not available for python 3.9. Must we wait a couple years until our minimum scipy is v1.15? Or should we add the functionality now, and just raise an error if the installed version of scipy is insufficient?
scipy v1.15.0 (Jan 2025) offers two new element-wise optimization functions: scipy.optimize.elementwise.find_root and scipy.optimize.elementwise.find_minimum. (See previous brief discussion of this scipy functionality in #974).
These functions can likely provide significant speed-ups for single-diode equation calculations. For example, rerunning the benchmark in #974 (comment) using the new
find_rootfunction gives this timing comparison forbishop88_i_from_v("chandrupatla" is the new scipy function):The
find_minimumfunction could likely speed up the lambertw approach as well, although I have not benchmarked it against our_golden_sect_DataFramefunction.The question is: when can we start using these in pvlib? The required scipy version is quite new, and not available for python 3.9. Must we wait a couple years until our minimum scipy is v1.15? Or should we add the functionality now, and just raise an error if the installed version of scipy is insufficient?