@@ -171,8 +171,8 @@ def test_martin_ruiz_diffuse():
171171
172172def test_iam_interp ():
173173
174- aoi_meas = [0.0 , 45.0 , 65.0 , 75.0 ]
175- iam_meas = [1.0 , 0.9 , 0.8 , 0.6 ]
174+ aoi_meas = np . array ( [0.0 , 45.0 , 65.0 , 75.0 ])
175+ iam_meas = np . array ( [1.0 , 0.9 , 0.8 , 0.6 ])
176176
177177 # simple default linear method
178178 aoi = 55.0
@@ -200,18 +200,18 @@ def test_iam_interp():
200200 assert_series_equal (iam , expected )
201201
202202 # check beyond reference values
203- aoi = [- 45 , 0 , 45 , 85 , 90 , 95 , 100 , 105 , 110 ]
204- expected = [0.9 , 1.0 , 0.9 , 0.4 , 0.3 , 0.2 , 0.1 , 0.0 , 0.0 ]
203+ aoi = np . array ( [- 45 , 0 , 45 , 85 , 90 , 95 , 100 , 105 , 110 ])
204+ expected = np . array ( [0.9 , 1.0 , 0.9 , 0.4 , 0.3 , 0.2 , 0.1 , 0.0 , 0.0 ])
205205 iam = _iam .interp (aoi , aoi_meas , iam_meas )
206206 assert_allclose (iam , expected )
207207
208208 # check exception clause
209209 with pytest .raises (ValueError ):
210- _iam .interp (0.0 , [0 ], [1 ])
210+ _iam .interp (0.0 , np . array ( [0 ]), np . array ( [1 ]) )
211211
212212 # check exception clause
213213 with pytest .raises (ValueError ):
214- _iam .interp (0.0 , [0 , 90 ], [1 , - 1 ])
214+ _iam .interp (0.0 , np . array ( [0 , 90 ]), np . array ( [1 , - 1 ]) )
215215
216216 # check linear after updating interp1d
217217 theta_ref = np .array ([0 , 60 , 90 ])
@@ -239,6 +239,14 @@ def test_iam_interp():
239239 expected = 1.0 - 1e-4 * aoi ** 2
240240 np .testing .assert_allclose (iam , expected , rtol = 1e-12 )
241241
242+ # check exception clause - list input for theta_ref
243+ with pytest .raises (TypeError ):
244+ _iam .interp (0.0 , [0 , 60 , 90 ], np .array ([1.0 , 0.8 , 0.0 ]))
245+
246+ # check exception clause - list input for iam_ref
247+ with pytest .raises (TypeError ):
248+ _iam .interp (0.0 , np .array ([0 , 60 , 90 ]), [1.0 , 0.8 , 0.0 ])
249+
242250
243251@pytest .mark .parametrize ('aoi,expected' , [
244252 (45 , 0.9975036250000002 ),
0 commit comments