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

Import error with latest version of numpy due to the np.lib.function_base.iterable #1568

Open
shengy90 opened this issue May 20, 2024 · 0 comments

Comments

@shengy90
Copy link

  • PyTorch-Forecasting version: 1.0.0
  • PyTorch version: 2.3.0
  • Python version: 3.9
  • Operating System: Mac OS Sonoma
  • Numpy version: 2.0.0rc

Expected behavior

from pytorch_forecasting.utils import autocorrelation

Actual behavior

Import error: No module named 'numpy.lib.function_base'

Code to reproduce the problem

from pytorch_forecasting.utils import autocorrelation

I think the issue is from from numpy.lib.function_base import iterable in base_model.py, but function_base is deprecated. You can now import iterable directly in numpy like so: from numpy import iterable.

I'm on Numpy 2.0, but I think this change is already in latest version of numpy 1.26 (https://numpy.org/doc/stable/reference/generated/numpy.iterable.html)

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

No branches or pull requests

1 participant