You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
problem
there is WET code in singlediode_methods where the inputs to i_from_v and v_from_i are manipulated for the newton method
solution
according to this comment here's a nice snippet:
def_prepare_newton_inputs(i_or_v, args, v0):
size, shape=_get_size_and_shape((i_or_v,) +args)
ifsize>1:
args= [np.asarray(arg) forarginargs]
# newton uses initial guess for the output shape# copy v0 to a new array and broadcast it to the shape of max sizeifshapeisnotNone:
v0=np.broadcast_to(v0, shape).copy()
else:
v0=voc_estreturnargs, v0
* closespvlib#498
* adds _prepare_newton_inputs(i_or_v_tup, args, v0)
* also replace verbose comment with more descriptive one to copy v0 if
it's an array to use for initial guess
problem
there is WET code in singlediode_methods where the inputs to i_from_v and v_from_i are manipulated for the newton method
solution
according to this comment here's a nice snippet:
alternatives
do nothing
Additional context
see #409
The text was updated successfully, but these errors were encountered: