Skip to content

Commit b9fd5e7

Browse files
committed
MAINT: Use RandomState to set seed locally
1 parent 83cec6a commit b9fd5e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tests/window/test_rolling.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ def test_rolling_window_as_string():
368368
date_today = datetime.now()
369369
days = pd.date_range(date_today, date_today + timedelta(365), freq="D")
370370

371-
np.random.seed(seed=421)
371+
npr = np.random.RandomState(seed=421)
372372

373-
data = np.random.randint(1, high=100, size=len(days))
373+
data = npr.randint(1, high=100, size=len(days))
374374
df = DataFrame({"DateCol": days, "metric": data})
375375

376376
df.set_index("DateCol", inplace=True)

0 commit comments

Comments
 (0)