Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduced min scipy req to 1.10 #178

Merged

Conversation

astrogilda
Copy link
Owner

Description

This pull request updates the pyproject.toml configuration by lowering the minimum required version of scipy from 1.13 to 1.10. This change addresses an ImportError encountered by users attempting to import MovingBlockBootstrap from the tsbootstrap library when using scipy versions 1.13 and above. Specifically, the error:

ImportError: cannot import name 'gaussian' from 'scipy.signal'

occurs because the gaussian function was removed or relocated in newer versions of scipy. By allowing scipy>=1.10, this PR ensures compatibility with versions that still include the necessary gaussian function, thereby resolving the import issue without sacrificing existing functionality.

Issue Addressed:
A user reported that importing MovingBlockBootstrap results in an ImportError due to incompatibility with scipy versions >=1.13. Downgrading to scipy 1.10 resolves the error, but the package's current pyproject.toml restricts scipy to >=1.13, preventing this workaround.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The changes were tested through the following steps:

  1. Environment Setup:

    • Created a virtual environment with scipy version 1.10.0.
    • Installed the updated version of tsbootstrap from the current branch.
  2. Import Verification:

    • Successfully imported MovingBlockBootstrap without encountering the ImportError.
      from tsbootstrap import MovingBlockBootstrap
  3. Functionality Testing:

    • Ran existing unit tests to ensure all functionalities of tsbootstrap operate as expected with scipy 1.10.0.
    • Verified that no new warnings or errors are introduced during package usage.
  4. Compatibility Check:

    • Ensured that the package remains compatible with scipy versions >=1.10 and <1.14.0 as specified.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules (if applicable)

Additional Information (if applicable)

  • Reason for Version Downgrade:
    The gaussian function required by tsbootstrap was removed or altered in scipy versions >=1.13, causing the import error. Downgrading to scipy 1.10 reinstates the necessary functionality.

  • Potential Impact:
    Users relying on scipy versions >=1.13 will need to use scipy <1.14.0 to maintain compatibility with tsbootstrap. This adjustment broadens the range of compatible scipy versions, allowing more flexibility for users who may need to use older versions.

@astrogilda astrogilda self-assigned this Nov 19, 2024
@astrogilda astrogilda linked an issue Nov 19, 2024 that may be closed by this pull request
@astrogilda astrogilda merged commit 6d6b9d3 into main Nov 19, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scipy bug : cannot import gaussian from scipy.signal
1 participant