Outdated numpy function
GabrielOttdeMedeiros opened this issue · 4 comments
In the attached line of code, I get the following error:
"`np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead."
prophet/python/prophet/forecaster.py
Line 459 in 36421b7
Can someone please update this? I am trying to deploy my code in a container and I cannot edit this myself.
I'm having the same issue.
@aeturrell I am not sure if this will help you, but this is how I worked around my issue:
I created a python environment using specific library versions:
numpy==1.24.4
matplotlib==3.7.2
pandas==2.0.3
scikit-learn==1.3.0
And then ran the following command in docker separately from the other libraries using prophet's recommended installation method, as seen in the attached link:
python -m pip install prophet
So if you are using docker it will look something like this:
# Copy requirements.txt to container root directory
COPY prophet/requirements.txt ./
# Install dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
RUN python -m pip install prophet
If you need to be on numpy 2.x, you can monkeypatch it like:
import numpy as np
np.float_ = np.float64
import prophet
until a Prophet fix is released.