Incompatible with numpy or unupdated library

Open
#2,617 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
linux, numpy, python

Research direction

Reproduce the import with Python 3.12.4 and NumPy 2.1.1, then inspect prophet/forecaster.py around line 459, as shown in the traceback. Confirm that importing Prophet completes successfully with this environment and that the reported NumPy compatibility error no longer occurs.

Written by the indexing model from the issue text.

Description

i get this error in python 3.12.4 in linux manjaro machine
with numpy at 2.1.1

Importing plotly failed. Interactive plots will not work.
Traceback (most recent call last):
  File "/tmp/test.py", line 1, in <module>
    from prophet import Prophet
  File "/tmp/prophet-env/lib/python3.12/site-packages/prophet/__init__.py", line 7, in <module>
    from prophet.forecaster import Prophet
  File "/tmp/prophet-env/lib/python3.12/site-packages/prophet/forecaster.py", line 28, in <module>
    class Prophet(object):
  File "/tmp/prophet-env/lib/python3.12/site-packages/prophet/forecaster.py", line 459, in Prophet
    ) -> NDArray[np.float_]:
                 ^^^^^^^^^
  File "/tmp/prophet-env/lib/python3.12/site-packages/numpy/__init__.py", line 400, in __getattr__
    raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.


with this code simple code


from prophet import Prophet

i think the library is not updated

Dominant language
Python
Stars
20.5k
Forks
4.6k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from facebook/prophet

All issues in facebook/prophet

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.