Skip to content

Numpy 2.0 support status? #2671

@ethanglaser

Description

@ethanglaser

Problem:

  • ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject when reaching import catboost as cb with numpy 2.0

catboost version:

  • version not specified during installation, defaults to 1.2.5

Operating System:

  • has occurred on every system that I have attempted (both windows and linux)

I am migrating code to numpy 2.0 and currently validating with numpy 2.0.0rc2. A script that uses catboost fails with the error message indicated above. Steps to reproduce:

conda create -n numpy2 python=3.12
conda activate numpy2
pip install numpy==2.0.0rc2
pip install catboost
python -c "import catboost as cb"

I have also faced this issue with python 3.11 and numpy 2.0.0rc1. I was under the impression that catboost is supporting numpy 2.0 already, but perhaps this is not the case? Otherwise, please let me know where I may be going wrong. Thanks.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions