Skip to content

Fix import for multipletests from statsmodels for 0.15.0 - #2784

Open
colleenjg wants to merge 1 commit into
AllenInstitute:masterfrom
colleenjg:fix-import-multipletests
Open

colleenjg wants to merge 1 commit into
AllenInstitute:masterfrom
colleenjg:fix-import-multipletests

Conversation

@colleenjg

Copy link
Copy Markdown
Contributor

Summary

receptive_field.py is incompatible with the latest version of statsmodels (0.15.0), as the following import now fails:

from statsmodels.sandbox.stats.multicomp import multipletests

This is because multipletests, which is defined in statsmodels.stats.multitest, is no longer globally imported in statsmodels.sandbox.stats.multicomp.

This commit fixes the import, and is fully backward compatible as multipletests has been defined in statsmodels.stats.multitest since around version 0.4.x, around 14 years ago.

Linked issue(s)

Change type

  • Bug fix (non-breaking change)
  • Security fix
  • Documentation update
  • Test-only change
  • Compatibility update (non-breaking)
  • New feature (community-contributed)
  • Breaking change

Maintenance mode acknowledgement

  • I have read the maintenance mode policy and understand that changes with high long-term maintenance cost may be declined.

What changed

  • Updated where multipletests is imported from in receptive_field.py.

Validation

Checked that the new import works with statsmodels versions: 0.15.0, 0.14.6 (released Dec 2025) and 0.13.5 (released Nov 2022).

Test evidence

  • Unit tests added/updated
  • Integration tests added/updated (if applicable)
  • Local test run passed
  • CI checks passed

Compatibility and risk

  • Backward compatibility impact: None
  • Dependency/platform impact: Supports compatibility with newer versions of statsmodels (>= 0.15.0).

Checklist

  • I followed the contribution guide
  • My changes are scoped and focused
  • I added/updated tests appropriate for this change
  • I ran relevant tests locally
  • I updated documentation/docstrings where needed
  • I performed a self-review
  • My PR targets the master branch

Additional notes

None

This branch has not been deployed

No deployments
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.

[Bug]: multipletests import fails in receptive_field.py

1 participant