Skip to content

Commit bdcc5bf

Browse files
authored
MAINT: Use float arange when required or intended (pandas-dev#35477)
1 parent 3b1d4f1 commit bdcc5bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/tests/window/test_base_indexer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def get_window_bounds(self, num_values, min_periods, center, closed):
140140
)
141141
def test_rolling_forward_window(constructor, func, np_func, expected, np_kwargs):
142142
# GH 32865
143-
values = np.arange(10)
143+
values = np.arange(10.0)
144144
values[5] = 100.0
145145

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

178178
@pytest.mark.parametrize("constructor", [Series, DataFrame])
179179
def test_rolling_forward_skewness(constructor):
180-
values = np.arange(10)
180+
values = np.arange(10.0)
181181
values[5] = 100.0
182182

183183
indexer = FixedForwardWindowIndexer(window_size=5)

pandas/tests/window/test_ewm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_ewma_halflife_without_times(halflife_with_times):
108108
@pytest.mark.parametrize("min_periods", [0, 2])
109109
def test_ewma_with_times_equal_spacing(halflife_with_times, times, min_periods):
110110
halflife = halflife_with_times
111-
data = np.arange(10)
111+
data = np.arange(10.0)
112112
data[::2] = np.nan
113113
df = DataFrame({"A": data, "time_col": date_range("2000", freq="D", periods=10)})
114114
result = df.ewm(halflife=halflife, min_periods=min_periods, times=times).mean()

0 commit comments

Comments
 (0)