YASA v0.7.0 #235
raphaelvallat
announced in
Announcements
YASA v0.7.0
#235
Replies: 2 comments
-
|
Fantastic! Thanks @raphaelvallat for putting in the huge amount of work to catch this up. The two new tutorials (migration guide and working with Hypnograms) look especially useful. I was worried about users picking up on that but those are a huge help and I think they will make the transition much more palettable. I myself have been using the Hypnogram class a lot and find it super convenient so I hope others do to. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Great to see the new release. Awesome work! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
v0.7.0 — March 2026
This is the first major release of YASA in two years 🎉 !
This release introduces a new object-oriented hypnogram API, new functionalities, and several bugfixes. This version requires Python 3.10+ and is fully compatible with pandas 3.x and numpy 2.x.
New: Object-oriented
HypnogramclassWarning
Breaking changes — action required
This release introduces the
yasa.Hypnogramclass as the new standard for representing hypnograms throughout YASA. Several functions and classes that previously returned plain NumPy arrays now return ayasa.Hypnograminstead, which will break existing code that expects an array. Key examples:SleepStaging.predict()now returns aHypnograminstead of a string array. To recover the underlying array use.hypno(string labels) or.as_int()(integer-encoded).yasa.plot_hypnogram()now requires aHypnogramas input.See the migration guide for step-by-step instructions, and the Working with Hypnograms tutorial for a full introduction to the new API.
New functions
yasa.fetch_sample: download and cache sample YASA data files. (PR #192), special thanks to @remrama for implementing this!API changes
SleepStaging.predict()now returns aHypnograminstead of a string NumPy array. Stage probabilities are stored in.probaand can be plotted with.plot_hypnodensity().yasa.plot_hypnogram()now requires aHypnograminstance as input (previously accepted a plain array).spindles_detect,sw_detect,rem_detect) now log an explicit warning whensforch_namesare ignored because an MNE object was passed. (PR #207)spindles_detectoutput now includes anAmplitudeFilteredcolumn reporting the spindle amplitude measured on the filtered signal. (issue #216)Bugfixes
yasa.compare_detection,yasa.Hypnogram, andyasa.SleepStaging.Dependencies
numpy >= 1.22.4,scipy >= 1.8.1,pandas >= 2.1.1.mne,scikit-learn,lightgbm,antropy,tensorpac) are now optionallspoptversion. (PR #195)Documentation
Packaging & tooling
src/layout,pyproject.toml-only configuration, numpy 2 compatibility. (PR #187)[dependency-groups](PEP 735).test-dependency-combinationsCI job: runs the test suite against minimum-supported and latest versions of numpy, scipy, pandas, MNE, and numba.Merged PRs
New Contributors
Full Changelog: v0.6.5...v0.7.0
This discussion was created from the release YASA v0.7.0.
Beta Was this translation helpful? Give feedback.
All reactions