Skip to content

Bug with numpy when importing ProbNum package #862

@williamlaplante

Description

@williamlaplante

Describe the bug
When I run "Import probnum as pn" and it runs the init.py file, I get an attribute error:
np.float_ was removed in the NumPy 2.0 release. Use np.float64 instead.
I downloaded probnum in a new/fresh conda environment, with no other packages installed prior to installing probnum (apart from the ones that are automatically installed in the process of installing the probnum package).

To Reproduce
Create a new conda environment with the most recent python version. Install pip, then run "pip install probnum". Open a python script and run "import probnum as pn" with no other lines of code.

Expected behavior
I would expect no attribute error to appear when importing the package.

System:

  • OS: MacOS 14.4.1
  • Numpy Version: 2.1.0, ProbNum Version: 0.1.16, Python Version: 3.12.4, Pip Version: 24.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions