@@ -2439,18 +2439,20 @@ def test_rolling_min_max_numeric_types(self):
2439
2439
types_test .extend ([np .dtype ("{}{}" .format (sign , width ))
2440
2440
for width in [1 , 2 , 4 , 8 ] for sign in "ui" ])
2441
2441
for data_type in types_test :
2442
- # Just testing that these don't throw exceptions and that the types match.
2443
- # Other tests will cover quantitative correctness
2442
+ # Just testing that these don't throw exceptions and that
2443
+ # the types match. Other tests will cover quantitative
2444
+ # correctness
2444
2445
for convert_to_float in [True ]:
2445
2446
if data_type .kind == 'f' or not convert_to_float :
2446
- # Floating point values are left as-is when convert_to_float is True.
2447
- # We compare to the original floating point type instead
2447
+ # Floating point values are left as-is when
2448
+ # convert_to_float is True. We compare to the
2449
+ # original floating point type instead
2448
2450
expected_type = data_type
2449
2451
else :
2450
2452
expected_type = np .dtype (float )
2451
- result = DataFrame (np .arange (20 , dtype = data_type )).rolling (window = 5 ).max (as_float = convert_to_float )
2453
+ result = (DataFrame (np .arange (20 , dtype = data_type ))
2454
+ .rolling (window = 5 ).max (as_float = convert_to_float ))
2452
2455
self .assertEqual (result .dtypes [0 ], expected_type )
2453
- result = DataFrame (np .arange (20 , dtype = data_type )).rolling (window = 5 ).min (as_float = convert_to_float )
2456
+ result = (DataFrame (np .arange (20 , dtype = data_type ))
2457
+ .rolling (window = 5 ).min (as_float = convert_to_float ))
2454
2458
self .assertEqual (result .dtypes [0 ], expected_type )
2455
-
2456
-
0 commit comments