Skip to content

Fix: replace deprecated force_all_finite with ensure_all_finite for sklearn>=1.6 - #720

Open
cngmid wants to merge 1 commit into
giotto-ai:masterfrom
cngmid:fix/sklearn-check_array
Open

Fix: replace deprecated force_all_finite with ensure_all_finite for sklearn>=1.6#720
cngmid wants to merge 1 commit into
giotto-ai:masterfrom
cngmid:fix/sklearn-check_array

Conversation

@cngmid

@cngmid cngmid commented Feb 10, 2026

Copy link
Copy Markdown

Reference issues/PRs
Fixes #719
This PR updates giotto‑tda’s use of sklearn.utils.check_array to maintain compatibility with scikit‑learn ≥ 1.6, which removed the force_all_finite parameter. The new parameter ensure_all_finite is now used instead.

Types of changes

  • Replaced all occurrences of force_all_finite with ensure_all_finite
  • The change is not backward‑compatible with scikit‑learn < 1.6

Description
Replaced all occurrences of force_all_finite with ensure_all_finite occurring in 5 files homology\cubical.py, homology\simplicial.py, metaestimators\collection_transformer.py, test_validation.py and utils\validation.py.

Any other comments?
This is a minimal, safe compatibility patch.
No functional behavior of giotto‑tda is changed beyond restoring compatibility.

Checklist

  • I have read the guidelines for contributing.
  • My code follows the code style of this project. I used flake8 to check my Python changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed. I used pytest to check this on Python tests.
  • Amended requirements.txt with scikit-learn >= 1.6.

@CLAassistant

CLAassistant commented Feb 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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] giotto-tda fails on sklearn>=1.6 due to removed force_all_finite parameter

2 participants