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

[ENH] Numpy 2.0 compatibility #6850

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ales-erjavec
Copy link
Contributor

@ales-erjavec ales-erjavec commented Jul 11, 2024

Issue

Numpy 2.0 compatibility

Currently numpy 2.0 support is still missing in catboost (catboost/catboost#2671).

Description of changes

np.float_ -> np.float64
np.NaN -> np.nan
np.ndarray.ptp -> np.ptp
np.in1d -> np.isin
np.row_stack -> np.vstack

Replace oldest-supported-numpy with numpy>2.0 in the build dependencies. This is the new preferred way.

Remove catboost from requirements.

Includes
  • Code changes
  • Tests
  • Documentation

@ales-erjavec ales-erjavec changed the title [MNT] Numpy 2.0 compatibility [ENH] Numpy 2.0 compatibility Jul 12, 2024
np.float_ -> np.float64
np.NaN -> np.nan
np.ndarray.ptp -> np.ptp
np.in1d -> np.isin
np.row_stack -> np.vstack
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.36%. Comparing base (083c53d) to head (2e7de0d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6850      +/-   ##
==========================================
- Coverage   88.47%   88.36%   -0.12%     
==========================================
  Files         332      332              
  Lines       73296    73296              
==========================================
- Hits        64849    64765      -84     
- Misses       8447     8531      +84     

@ales-erjavec ales-erjavec marked this pull request as ready for review January 24, 2025 10:08
Catch all exceptions at import attempt.
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.

1 participant