@@ -2188,12 +2188,12 @@ def test_pvwatts_dc_scalars_with_k():
21882188
21892189
21902190def test_pvwatts_dc_arrays_with_k ():
2191- irrad_trans = np .array ([np .nan , 100 , 100 ])
2191+ irrad_trans = np .array ([np .nan , 100 , 1200 ])
21922192 temp_cell = np .array ([30 , np .nan , 30 ])
21932193 irrad_trans , temp_cell = np .meshgrid (irrad_trans , temp_cell )
2194- expected = np .array ([[nan , 8.9125 , 8.9125 ],
2194+ expected = np .array ([[nan , 8.9125 , 118.45 ],
21952195 [nan , nan , nan ],
2196- [nan , 8.9125 , 8.9125 ]])
2196+ [nan , 8.9125 , 118.45 ]])
21972197 out = pvsystem .pvwatts_dc (irrad_trans , temp_cell , 100 , - 0.003 , 25 , 0.01 )
21982198 assert_allclose (out , expected , equal_nan = True )
21992199
@@ -2221,6 +2221,18 @@ def test_pvwatts_dc_with_k_and_cap_adjustment():
22212221 assert_allclose (out , expected )
22222222
22232223
2224+ def test_pvwatts_dc_arrays_with_k_and_cap_adjustment ():
2225+ irrad_trans = np .array ([np .nan , 100 , 1200 ])
2226+ temp_cell = np .array ([30 , np .nan , 30 ])
2227+ irrad_trans , temp_cell = np .meshgrid (irrad_trans , temp_cell )
2228+ expected = np .array ([[nan , 8.9125 , 118.2 ],
2229+ [nan , nan , nan ],
2230+ [nan , 8.9125 , 118.2 ]])
2231+ out = pvsystem .pvwatts_dc (irrad_trans , temp_cell , 100 , - 0.003 , 25 , 0.01 ,
2232+ True )
2233+ assert_allclose (out , expected , equal_nan = True )
2234+
2235+
22242236def test_pvwatts_losses_default ():
22252237 expected = 14.075660688264469
22262238 out = pvsystem .pvwatts_losses ()
0 commit comments