Skip to content

Release/0.4.6 - #71

Merged
brovelli merged 8 commits into
masterfrom
release/0.4.6
Sep 18, 2026
Merged

brovelli merged 8 commits into
masterfrom
release/0.4.6

Conversation

@brovelli

Copy link
Copy Markdown
Member

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.

brovelli and others added 8 commits September 18, 2026 17:28
- 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>
@brovelli
brovelli merged commit 0edadbc into master Sep 18, 2026
3 checks passed
@brovelli
brovelli deleted the release/0.4.6 branch September 19, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant