Release/0.4.6 - #71
Merged
Merged
Conversation
- Version 0.4.6, single-sourced from frites/__init__.py (setup.py used to carry its own copy of the version string). - python_requires='>=3.10': the package is tested on 3.10-3.12 only and pip must not install it on older interpreters. - Remove the np.in1d monkeypatch from frites/__init__.py. It rewrote the NumPy namespace globally on `import frites` and its premise does not hold: no supported mne release (checked 1.6.1, 1.12.1, 1.13.2) references np.in1d. The full test suite passes without it on NumPy 2.5.3 with both mne 1.12.1 and 1.13.2. - What's new: split the v0.4.5 section (what the PyPI 0.4.5 wheel contains) from v0.4.6 (conn_spec fixes of #69, zero_mean, doc build and pkg_resources fixes of #70, shim removal, Python floor), and fix a mixed bullet character in the v0.4.4 section. Verified: 156/156 tests on Python 3.10 + mne 1.5.0 and on Python 3.12 + mne 1.13.2 + NumPy 2.5.3; wheel metadata reports Version 0.4.6 and Requires-Python >=3.10 and ships the .mplstyle data files; docs build. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- trial_swap_surrogates built a RandomState from `random_state` but shuffled the trials with the global np.random.shuffle, so the seed had no effect and surrogates were not reproducible. - sim_local_ccd_ms drew the conditions from the global generator and had no `random_state` parameter (unlike sim_local_cc_ms it wraps). Add it and forward the same seed to the continuous part of the simulation. Regression tests: same seed -> identical output, different seed -> different output, surrogates are per-channel permutations of the trials. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ctransform ranks the samples with argsort, which places NaN like any other value. A single NaN in the data therefore produced a finite, meaningless mutual information without any warning (probe: one NaN in x -> gcmi_1d_cc = -0.0025). ctransform is the single choke point of copnorm_1d / copnorm_nd / copnorm_cat_* and of the GCMI estimators, so the check lives there and raises a ValueError with guidance. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
WfMi.fit(n_perm=0, mcp='cluster' | 'fdr' | 'maxstat') computed the mutual information and then died in WfStats.fit with a bare AssertionError (`k.ndim >= 3` on empty permutation arrays). WfMi and WfConnComod now raise a ValueError up front pointing to mcp='noperm' (the supported way to skip permutations), and WfStats.fit treats empty permutation arrays like an absent null distribution (p-values of 1) for direct callers. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Two FutureWarnings in _dataarray_unstack / conn_reshape_directed announced behaviour changes: - xr.concat: the defaults of `coords` and `compat` are changing; pass coords='different', compat='equals' explicitly (current behaviour). - assigning a raw pandas.MultiIndex to a coordinate will stop being promoted to a multi-index; build it with xr.Coordinates.from_pandas_multiindex + assign_coords (xarray >= 2023.8, now the requirements floor). Also select the duplicated-entries mask along `axis` instead of the hard-coded 'roi'. The directed-reshape test now runs with FutureWarning promoted to an error. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`n_jobs` was forwarded both to MNE's time-frequency decomposition and to the joblib loop over pairs, i.e. nested parallelism that oversubscribed the CPU with the default n_jobs=-1. The decomposition now runs with n_jobs=1; the documented parallel level (pairs) is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Colormap.set_bad is pending deprecation in matplotlib. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for contributing a pull request!
Please be aware that we are a loose team of volunteers so patience is
necessary. Assistance handling other issues is very welcome. We value
all user contributions, no matter how minor they are. If we are slow to
review, either the pull request needs some benchmarking, tinkering,
convincing, etc. or more likely the reviewers are simply busy. In either
case, we ask for your understanding during the review process.
Again, thanks for contributing!
Reference issue
Example: Fixes #1234.
What does this implement/fix?
Explain your changes.
Additional information
Any additional information you think is important.