Skip to content

avoid warnings about use of deprecated scipy.linalg.pinv2#5437

Merged
sciunto merged 1 commit intoscikit-image:mainfrom
grlee77:avoid-use-of-deprecated-pinv2
Jun 21, 2021
Merged

avoid warnings about use of deprecated scipy.linalg.pinv2#5437
sciunto merged 1 commit intoscikit-image:mainfrom
grlee77:avoid-use-of-deprecated-pinv2

Conversation

@grlee77
Copy link
Contributor

@grlee77 grlee77 commented Jun 21, 2021

Description

SciPy 1.7.0 is causing a new failure in the CI tests due to a deprecation warning regarding scipy.linalg.pinv2. We never call this function directly in scikit-image, but the cg_mg option to random_walker_segmentation calls a pyamg functdion that uses it by default.

Here, I change the pyamg call to prefer pinv rather than pinv2 to avoid the warning.

Checklist

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.

pyamg uses coarse_solver='pinv2' by default, but SciPy 1.7.0 has deprecated pinv2
@grlee77 grlee77 added the 🔧 type: Maintenance Refactoring and maintenance of internals label Jun 21, 2021
@sciunto sciunto merged commit 23fd40b into scikit-image:main Jun 21, 2021
@grlee77 grlee77 deleted the avoid-use-of-deprecated-pinv2 branch July 8, 2021 20:38
grlee77 added a commit that referenced this pull request Aug 23, 2021
…fix) (#5531)

* Backport gh-5529: Handle pooch version 1.5.0

import file_hash from Pooch public API

* Backport gh-5437: Avoid use of deprecated scipy.linalg.pinv2

pyamg used coarse_solver='pinv2' by default, but SciPy 1.7.0 has deprecated pinv2

* update version string

* DOC: add release notes for 0.18.3

Co-authored-by: Gregory R. Lee <grlee77@gmail.com>
Co-authored-by: Mark Harfouche <mark.harfouche@gmail.com>
Co-authored-by: David Manthey <david.manthey@kitware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 type: Maintenance Refactoring and maintenance of internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants