Skip to content

Commit

Permalink
MAINT: Use float arange when required or intended (pandas-dev#35477)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashtage authored Jul 30, 2020
1 parent 3b1d4f1 commit bdcc5bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pandas/tests/window/test_base_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def get_window_bounds(self, num_values, min_periods, center, closed):
)
def test_rolling_forward_window(constructor, func, np_func, expected, np_kwargs):
# GH 32865
values = np.arange(10)
values = np.arange(10.0)
values[5] = 100.0

indexer = FixedForwardWindowIndexer(window_size=3)
Expand Down Expand Up @@ -177,7 +177,7 @@ def test_rolling_forward_window(constructor, func, np_func, expected, np_kwargs)

@pytest.mark.parametrize("constructor", [Series, DataFrame])
def test_rolling_forward_skewness(constructor):
values = np.arange(10)
values = np.arange(10.0)
values[5] = 100.0

indexer = FixedForwardWindowIndexer(window_size=5)
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/window/test_ewm.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_ewma_halflife_without_times(halflife_with_times):
@pytest.mark.parametrize("min_periods", [0, 2])
def test_ewma_with_times_equal_spacing(halflife_with_times, times, min_periods):
halflife = halflife_with_times
data = np.arange(10)
data = np.arange(10.0)
data[::2] = np.nan
df = DataFrame({"A": data, "time_col": date_range("2000", freq="D", periods=10)})
result = df.ewm(halflife=halflife, min_periods=min_periods, times=times).mean()
Expand Down

0 comments on commit bdcc5bf

Please sign in to comment.