@@ -768,12 +768,12 @@ def _lambertw_v_from_i(current, photocurrent, saturation_current,
768768 # Ensure that we are working with read-only views of numpy arrays
769769 # Turns Series into arrays so that we don't have to worry about
770770 # multidimensional broadcasting failing
771- I , IL , I0 , Rs , Gsh , a = \
771+ Iop , IL , I0 , Rs , Gsh , a = \
772772 np .broadcast_arrays (current , photocurrent , saturation_current ,
773773 resistance_series , conductance_shunt , nNsVth )
774774
775- # Intitalize output V (I might not be float64)
776- V = np .full_like (I , np .nan , dtype = np .float64 )
775+ # Intitalize output Vop (Iop might not be float64)
776+ Vop = np .full_like (Iop , np .nan , dtype = np .float64 )
777777
778778 # Determine indices where 0 < Gsh requires implicit model solution
779779 idx_p = 0. < Gsh
@@ -783,14 +783,14 @@ def _lambertw_v_from_i(current, photocurrent, saturation_current,
783783
784784 # Explicit solutions where Gsh=0
785785 if np .any (idx_z ):
786- V [idx_z ] = a [idx_z ] * np .log1p ((IL [idx_z ] - I [idx_z ]) / I0 [idx_z ]) - \
787- I [idx_z ] * Rs [idx_z ]
786+ Vop [idx_z ] = a [idx_z ] * np .log1p ((IL [idx_z ] - Iop [idx_z ]) / I0 [idx_z ]) - \
787+ Iop [idx_z ] * Rs [idx_z ]
788788
789789 # Only compute using LambertW if there are cases with Gsh>0
790790 if np .any (idx_p ):
791791
792792 # use only the relevant subset for what follows
793- I = I [idx_p ]
793+ Iop = Iop [idx_p ]
794794 IL = IL [idx_p ]
795795 I0 = I0 [idx_p ]
796796 Rs = Rs [idx_p ]
@@ -800,7 +800,7 @@ def _lambertw_v_from_i(current, photocurrent, saturation_current,
800800 # LambertW argument, cannot be float128, may overflow to np.inf
801801 # overflow is explicitly handled below, so ignore warnings here
802802 with np .errstate (over = 'ignore' ):
803- argW = I0 / (Gsh * a ) * np .exp ((- I + IL + I0 ) / (Gsh * a ))
803+ argW = I0 / (Gsh * a ) * np .exp ((- Iop + IL + I0 ) / (Gsh * a ))
804804
805805 lambertwterm = np .zeros_like (argW )
806806
@@ -814,19 +814,19 @@ def _lambertw_v_from_i(current, photocurrent, saturation_current,
814814 # Calculate using log(argW) in case argW is really big
815815 logargW = (np .log (I0 [idx_inf ]) - np .log (Gsh [idx_inf ]) -
816816 np .log (a [idx_inf ]) +
817- (- I [idx_inf ] + IL [idx_inf ] + I0 [idx_inf ]) /
817+ (- Iop [idx_inf ] + IL [idx_inf ] + I0 [idx_inf ]) /
818818 (Gsh [idx_inf ] * a [idx_inf ]))
819819 lambertwterm [idx_inf ] = _log_lambertw (logargW )
820820
821821 # Eqn. 3 in Jain and Kapoor, 2004
822822 # V = -I*(Rs + Rsh) + IL*Rsh - a*lambertwterm + I0*Rsh
823823 # Recast in terms of Gsh=1/Rsh for better numerical stability.
824- V [idx_p ] = (IL + I0 - I ) / Gsh - I * Rs - a * lambertwterm
824+ Vop [idx_p ] = (IL + I0 - Iop ) / Gsh - Iop * Rs - a * lambertwterm
825825
826826 if output_is_scalar :
827- return V .item ()
827+ return Vop .item ()
828828 else :
829- return V
829+ return Vop
830830
831831
832832def _lambertw_i_from_v (voltage , photocurrent , saturation_current ,
0 commit comments