Skip to content

Commit

Permalink
Remove annoying warning
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelvallat committed Jan 8, 2023
1 parent c8ea05b commit 3d5c72e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions yasa/hypno.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,11 +1196,11 @@ def hypno_int_to_str(
hypno : array_like
The corresponding integer hypnogram.
"""
warnings.warn(
"The `yasa.hypno_int_to_str` function is deprecated and will be removed in v0.8. "
"Please use the `yasa.Hypnogram` class to create an hypnogram instead.",
FutureWarning,
)
# warnings.warn(
# "The `yasa.hypno_int_to_str` function is deprecated and will be removed in v0.8. "
# "Please use the `yasa.Hypnogram` class to create an hypnogram instead.",
# FutureWarning,
# )
assert isinstance(hypno, (list, np.ndarray, pd.Series)), "Not an array."
hypno = pd.Series(np.asarray(hypno, dtype=int))
return hypno.map(mapping_dict).values
Expand Down

0 comments on commit 3d5c72e

Please sign in to comment.