Skip to content

Commit

Permalink
Check random_state before random_state[1]
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Davis <[email protected]>
  • Loading branch information
junholee6a and micdavis authored Sep 8, 2023
1 parent 555b0a7 commit 91b12ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataprofiler/labelers/data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ def __init__(
random_state = random.Random(random_state)
elif isinstance(random_state, (list, tuple)) and len(random_state) == 3:
# tuple required for random state to be set, lists do not work
if isinstance(random_state[1], list) and isinstance(random_state, list):
if isinstance(random_state, list) and isinstance(random_state[1], list):
random_state[1] = tuple(random_state[1])
if isinstance(random_state, list):
random_state = tuple(random_state)
Expand Down

0 comments on commit 91b12ab

Please sign in to comment.