Skip to content

[refactor] scipy.linalg.misc is depracated: refactor imports#3423

Open
tepals wants to merge 1 commit intodelmic:masterfrom
tepals:refactor-deprc-warn-linalg-error
Open

[refactor] scipy.linalg.misc is depracated: refactor imports#3423
tepals wants to merge 1 commit intodelmic:masterfrom
tepals:refactor-deprc-warn-linalg-error

Conversation

@tepals
Copy link
Contributor

@tepals tepals commented Mar 26, 2026

fixes warning: DeprecationWarning: Please use LinAlgError from the scipy.linalg namespace, the scipy.linalg.misc namespace is deprecated

fixes warning: DeprecationWarning: Please use `LinAlgError` from the `scipy.linalg` namespace, the `scipy.linalg.misc` namespace is deprecated
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors SciPy imports to eliminate the scipy.linalg.misc deprecation warning by importing LinAlgError directly from the supported scipy.linalg namespace.

Changes:

  • Update LinAlgError import in core linear algebra utility module.
  • Update LinAlgError import in the corresponding unit test module.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/odemis/util/linalg.py Switches LinAlgError import to scipy.linalg to avoid deprecated scipy.linalg.misc.
src/odemis/util/test/linalg_test.py Updates test import to match the new LinAlgError import path.

@coderabbitai
Copy link

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8d95c060-c9b9-438f-b094-31fb3687b21c

📥 Commits

Reviewing files that changed from the base of the PR and between f9f275c and 52e0982.

📒 Files selected for processing (2)
  • src/odemis/util/linalg.py
  • src/odemis/util/test/linalg_test.py

📝 Walkthrough

Walkthrough

The pull request updates the import source for LinAlgError exception handling in two files. In src/odemis/util/linalg.py, the import statement was changed from scipy.linalg.misc to scipy.linalg. The same import path update was applied to the test file src/odemis/util/test/linalg_test.py. No changes were made to the logic, control flow, or how the exception is used in either file.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: refactoring scipy.linalg.misc imports due to deprecation, which matches the changeset modifications.
Description check ✅ Passed The description is directly related to the changeset, explaining the deprecation warning and the rationale for updating the import paths.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants