From e5e5980c6eed98282ab6d0e77a960f8429823f94 Mon Sep 17 00:00:00 2001 From: larsevj Date: Tue, 10 Sep 2024 18:54:45 +0200 Subject: [PATCH] Fix numpy arguments --- tests/test_realization.py | 2 +- tests/test_virtualensemble.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_realization.py b/tests/test_realization.py index b691a462..6fce798d 100644 --- a/tests/test_realization.py +++ b/tests/test_realization.py @@ -328,7 +328,7 @@ def test_volumetric_rates(): # Pick 10 **random** dates to get the volumetric rates between: daily_dates = real.get_smry_dates(freq="daily", normalize=False) - rng = np.random.Generator() + rng = np.random.default_rng() subset_dates = rng.choice(daily_dates, size=10, replace=False) subset_dates.sort() dcum = real.get_smry(column_keys="FOPT", time_index=subset_dates) diff --git a/tests/test_virtualensemble.py b/tests/test_virtualensemble.py index 9e639052..bbbdc32c 100644 --- a/tests/test_virtualensemble.py +++ b/tests/test_virtualensemble.py @@ -312,7 +312,7 @@ def test_todisk(tmpdir): assert set(vens.keys()) == set(fromcsvdisk2.keys()) # Test manual intervention: - rng = np.random.Generator() + rng = np.random.default_rng() fooframe = pd.DataFrame( data=rng.standard_normal(size=(3, 3)), columns=["FOO", "BAR", "COM"] )