Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default dtype of pandas.Series is now a categorical #126

Merged
merged 3 commits into from
Dec 31, 2022

Conversation

raphaelvallat
Copy link
Owner

Closes #125

This PR:

  • changes the default dtype of hyp.hypno as a pandas.CategoricalDtype
  • set the default return dtype from np.int64 to np.int16 in Hypnogram.as_int()
  • fixes a few typos and improves docstrings

Hopefully this should be pretty straightforward to review. Let me know if you have any questions! We're so close :)

@raphaelvallat raphaelvallat added the enhancement 🚧 New feature or request label Dec 30, 2022
@raphaelvallat raphaelvallat added this to In progress in Hypnogram via automation Dec 30, 2022
@raphaelvallat raphaelvallat self-assigned this Dec 30, 2022
@codecov-commenter
Copy link

codecov-commenter commented Dec 30, 2022

Codecov Report

Base: 92.57% // Head: 92.59% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (7083921) compared to base (9be559d).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
+ Coverage   92.57%   92.59%   +0.01%     
==========================================
  Files          23       23              
  Lines        3112     3119       +7     
==========================================
+ Hits         2881     2888       +7     
  Misses        231      231              
Impacted Files Coverage Δ
yasa/plotting.py 96.98% <ø> (ø)
yasa/hypno.py 98.58% <100.00%> (+0.01%) ⬆️
yasa/tests/test_hypno.py 100.00% <100.00%> (ø)
yasa/tests/test_hypnoclass.py 100.00% <100.00%> (ø)
yasa/tests/test_plotting.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@remrama remrama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweeeeet. Approve 🚀

This was a great idea I'm so glad you considered this before release.

I also added some comments that address the last few that were still hanging on #124 when it was merged.

yasa/hypno.py Show resolved Hide resolved
yasa/hypno.py Show resolved Hide resolved
yasa/hypno.py Show resolved Hide resolved
yasa/hypno.py Show resolved Hide resolved
yasa/hypno.py Outdated Show resolved Hide resolved
@raphaelvallat raphaelvallat merged commit 37058f2 into master Dec 31, 2022
Hypnogram automation moved this from In progress to Done Dec 31, 2022
@raphaelvallat raphaelvallat deleted the hypno_as_categorical branch December 31, 2022 00:02
@raphaelvallat raphaelvallat mentioned this pull request Jan 8, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🚧 New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Hypnogram.hypno as a pd.Categorical?
3 participants