|
10 | 10 |
|
11 | 11 | @pytest.fixture(params=[True, False]) |
12 | 12 | def raw(request): |
| 13 | + """raw keyword argument for rolling.apply""" |
13 | 14 | return request.param |
14 | 15 |
|
15 | 16 |
|
@@ -274,43 +275,22 @@ def consistency_data(request): |
274 | 275 | return request.param |
275 | 276 |
|
276 | 277 |
|
277 | | -def _create_arr(): |
278 | | - """Internal function to mock an array.""" |
| 278 | +def _create_series(): |
| 279 | + """Internal function to mock Series.""" |
279 | 280 | arr = np.random.randn(100) |
280 | 281 | locs = np.arange(20, 40) |
281 | 282 | arr[locs] = np.NaN |
282 | | - return arr |
283 | | - |
284 | | - |
285 | | -def _create_rng(): |
286 | | - """Internal function to mock date range.""" |
287 | | - rng = bdate_range(datetime(2009, 1, 1), periods=100) |
288 | | - return rng |
289 | | - |
290 | | - |
291 | | -def _create_series(): |
292 | | - """Internal function to mock Series.""" |
293 | | - arr = _create_arr() |
294 | | - series = Series(arr.copy(), index=_create_rng()) |
| 283 | + series = Series(arr, index=bdate_range(datetime(2009, 1, 1), periods=100)) |
295 | 284 | return series |
296 | 285 |
|
297 | 286 |
|
298 | 287 | def _create_frame(): |
299 | 288 | """Internal function to mock DataFrame.""" |
300 | | - rng = _create_rng() |
301 | | - return DataFrame(np.random.randn(100, 10), index=rng, columns=np.arange(10)) |
302 | | - |
303 | | - |
304 | | -@pytest.fixture |
305 | | -def nan_locs(): |
306 | | - """Make a range as loc fixture.""" |
307 | | - return np.arange(20, 40) |
308 | | - |
309 | | - |
310 | | -@pytest.fixture |
311 | | -def arr(): |
312 | | - """Make an array as fixture.""" |
313 | | - return _create_arr() |
| 289 | + return DataFrame( |
| 290 | + np.random.randn(100, 10), |
| 291 | + index=bdate_range(datetime(2009, 1, 1), periods=100), |
| 292 | + columns=np.arange(10), |
| 293 | + ) |
314 | 294 |
|
315 | 295 |
|
316 | 296 | @pytest.fixture |
|
0 commit comments