@@ -224,8 +224,9 @@ def test_lookup_linke_turbidity_nointerp():
224
224
225
225
226
226
def test_lookup_linke_turbidity_months ():
227
- times = pd .date_range (start = '2014-04-01' , end = '2014-07-01' ,
228
- freq = '1M' , tz = 'America/Phoenix' )
227
+ times = pd .date_range (start = '2014-05-01' , end = '2014-07-01' ,
228
+ freq = '1MS' , tz = 'America/Phoenix' ,
229
+ ) - pd .Timedelta (days = 1 )
229
230
expected = pd .Series (
230
231
np .array ([2.89918032787 , 2.97540983607 , 3.19672131148 ]), index = times
231
232
)
@@ -234,8 +235,9 @@ def test_lookup_linke_turbidity_months():
234
235
235
236
236
237
def test_lookup_linke_turbidity_months_leapyear ():
237
- times = pd .date_range (start = '2016-04-01' , end = '2016-07-01' ,
238
- freq = '1M' , tz = 'America/Phoenix' )
238
+ times = pd .date_range (start = '2016-05-01' , end = '2016-07-01' ,
239
+ freq = '1MS' , tz = 'America/Phoenix' ,
240
+ ) - pd .Timedelta (days = 1 )
239
241
expected = pd .Series (
240
242
np .array ([2.89918032787 , 2.97540983607 , 3.19672131148 ]), index = times
241
243
)
@@ -245,14 +247,16 @@ def test_lookup_linke_turbidity_months_leapyear():
245
247
246
248
def test_lookup_linke_turbidity_nointerp_months ():
247
249
times = pd .date_range (start = '2014-04-10' , end = '2014-07-10' ,
248
- freq = '1M' , tz = 'America/Phoenix' )
250
+ freq = '1MS' , tz = 'America/Phoenix' ,
251
+ ) - pd .Timedelta (days = 1 )
249
252
expected = pd .Series (np .array ([2.85 , 2.95 , 3. ]), index = times )
250
253
out = clearsky .lookup_linke_turbidity (times , 32.125 , - 110.875 ,
251
254
interp_turbidity = False )
252
255
assert_series_equal (expected , out )
253
256
# changing the dates shouldn't matter if interp=False
254
257
times = pd .date_range (start = '2014-04-05' , end = '2014-07-05' ,
255
- freq = '1M' , tz = 'America/Phoenix' )
258
+ freq = '1MS' , tz = 'America/Phoenix' ,
259
+ ) - pd .Timedelta (days = 1 )
256
260
out = clearsky .lookup_linke_turbidity (times , 32.125 , - 110.875 ,
257
261
interp_turbidity = False )
258
262
assert_series_equal (expected , out )
0 commit comments