Repository navigation
By-pass set_annotations when plotting ICA sources - #11763
mscheltienne wants to merge 6 commits into
Conversation
|
That should do it, test are failing or main and passing in this PR because in |
| assert len(fig.mne.ax_hscroll.collections) == 1 | ||
| else: | ||
| assert len(fig.mne.regions) == 1 | ||
| assert np.allclose(fig.mne.regions[0].getRegion(), (0.2, 0.3)) |
There was a problem hiding this comment.
Do not use assert np.allclose in tests but rather assert_allclose -- it has a sane default atol=0 and also more informative message on failure
| assert np.allclose(fig.mne.regions[0].getRegion(), (0.2, 0.3)) | |
| assert_allclose(fig.mne.regions[0].getRegion(), (0.2, 0.3)) |
There was a problem hiding this comment.
Thanks for the tip, I'll look into numpy.testing, looks useful :)
| assert len(fig.mne.ax_hscroll.collections) == 1 | ||
| else: | ||
| assert len(fig.mne.regions) == 1 | ||
| assert np.allclose(fig.mne.regions[0].getRegion(), (0.2, 0.3)) |
There was a problem hiding this comment.
Same here. Then you'll need to import at the top.
I tried to push the change but GitHub wouldn't let me for some reason
There was a problem hiding this comment.
I can't either.. well that's interesting.
Fixes #11762
Tested in the following scenario:
raw.first_sampset to 0, with and without measurement dateraw.first_sampdifferent from 0, with and without measurement dateI'll try to add some tests when able.