Skip to content

Commit

Permalink
REFACTOR-#6622: don't use deprecated 'random_integers' func (#6623)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev authored Oct 3, 2023
1 parent 4531ae1 commit 2087e18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions modin/pandas/test/dataframe/test_map_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ def test_clip(request, data, axis, bound_type):
else len(modin_df.columns)
)
# set bounds
lower, upper = np.sort(random_state.random_integers(RAND_LOW, RAND_HIGH, 2))
lower, upper = np.sort(random_state.randint(RAND_LOW, RAND_HIGH, 2))

# test only upper scalar bound
modin_result = modin_df.clip(None, upper, axis=axis)
Expand All @@ -875,8 +875,8 @@ def test_clip(request, data, axis, bound_type):
pandas_result = pandas_df.clip(lower, upper, axis=axis)
df_equals(modin_result, pandas_result)

lower = random_state.random_integers(RAND_LOW, RAND_HIGH, ind_len)
upper = random_state.random_integers(RAND_LOW, RAND_HIGH, ind_len)
lower = random_state.randint(RAND_LOW, RAND_HIGH, ind_len)
upper = random_state.randint(RAND_LOW, RAND_HIGH, ind_len)

if bound_type == "series":
modin_lower = pd.Series(lower)
Expand Down
6 changes: 3 additions & 3 deletions modin/pandas/test/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ def test_clip_scalar(request, data, bound_type):

if name_contains(request.node.name, numeric_dfs):
# set bounds
lower, upper = np.sort(random_state.random_integers(RAND_LOW, RAND_HIGH, 2))
lower, upper = np.sort(random_state.randint(RAND_LOW, RAND_HIGH, 2))

# test only upper scalar bound
modin_result = modin_series.clip(None, upper)
Expand All @@ -1273,8 +1273,8 @@ def test_clip_sequence(request, data, bound_type):
)

if name_contains(request.node.name, numeric_dfs):
lower = random_state.random_integers(RAND_LOW, RAND_HIGH, len(pandas_series))
upper = random_state.random_integers(RAND_LOW, RAND_HIGH, len(pandas_series))
lower = random_state.randint(RAND_LOW, RAND_HIGH, len(pandas_series))
upper = random_state.randint(RAND_LOW, RAND_HIGH, len(pandas_series))

if bound_type == "series":
modin_lower = pd.Series(lower)
Expand Down

0 comments on commit 2087e18

Please sign in to comment.