Skip to content

Fix for numpy 2.4 scalar conversion#2868

Merged
david-cortes-intel merged 1 commit into
uxlfoundation:mainfrom
ethanglaser:dev/eglaser-np24-fix
Dec 29, 2025
Merged

Fix for numpy 2.4 scalar conversion#2868
david-cortes-intel merged 1 commit into
uxlfoundation:mainfrom
ethanglaser:dev/eglaser-np24-fix

Conversation

@ethanglaser
Copy link
Copy Markdown
Contributor

Description

As of numpy 2.4, TypeError is raised when converting a numpy array of ndim > 0 to scalar, leading to an error in daal4py svm.

See numpy/numpy#29841 and https://github.com/numpy/numpy/releases/tag/v2.4.0 for details

Checklist:

Completeness and readability

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes or created a separate PR with updates and provided its number in the description, if necessary.
  • Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • I have resolved any merge conflicts that might occur with the base branch.

Testing

  • I have run it locally and tested the changes extensively.
  • All CI jobs are green or I have provided justification why they aren't.
  • I have extended testing suite if new functionality was introduced in this PR.

Performance

  • I have measured performance for affected algorithms using scikit-learn_bench and provided at least a summary table with measured data, if performance change is expected.
  • I have provided justification why performance and/or quality metrics have changed or why changes are not expected.
  • I have extended the benchmarking suite and provided a corresponding scikit-learn_bench PR if new measurable functionality was introduced in this PR.

@ethanglaser
Copy link
Copy Markdown
Contributor Author

/intelci: run

@ethanglaser ethanglaser mentioned this pull request Dec 23, 2025
10 tasks
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
azure 80.46% <ø> (ø)
github 82.45% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@Vika-F Vika-F left a comment

Choose a reason for hiding this comment

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

LGTM

I hope some day daal4py will be removed entirely, so there will be no need in fixing it.

@david-cortes-intel
Copy link
Copy Markdown
Contributor

/intelci: run

@david-cortes-intel david-cortes-intel marked this pull request as ready for review December 29, 2025 10:07
@david-cortes-intel david-cortes-intel merged commit 3cc3f4d into uxlfoundation:main Dec 29, 2025
30 of 32 checks passed
@ethanglaser
Copy link
Copy Markdown
Contributor Author

@mergify backport rls/2025.10.0-rls

@mergify
Copy link
Copy Markdown

mergify Bot commented Dec 30, 2025

backport rls/2025.10.0-rls

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Dec 30, 2025
@ethanglaser
Copy link
Copy Markdown
Contributor Author

@mergify backport rls/2025.10.1-rls

@mergify
Copy link
Copy Markdown

mergify Bot commented Dec 30, 2025

backport rls/2025.10.1-rls

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Dec 30, 2025
napetrov pushed a commit that referenced this pull request Dec 30, 2025
(cherry picked from commit 3cc3f4d)

Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com>
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.

3 participants