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

neurolab throws an exception with numpy version 2 #46

Open
Nadine45832 opened this issue Nov 15, 2024 · 0 comments
Open

neurolab throws an exception with numpy version 2 #46

Nadine45832 opened this issue Nov 15, 2024 · 0 comments

Comments

@Nadine45832
Copy link

Hi,

I was working on my lab in college and I ran into a problem. I installed numpy latest version (2.1.3) and neurolab latest version (0.3.5) in my environment. When I import both of them, numpy inside neurolab throws an exception:

`np.Inf` was removed in the NumPy 2.0 release. Use `np.inf` instead.

This is a call stack:

Traceback (most recent call last):
  File "NeuralNetworks/nn.py", line 2, in <module>
    import neurolab as nl
  File "NeuralNetworks/venv/lib/python3.12/site-packages/neurolab/__init__.py", line 54, in <module>
    from . import net
  File "NeuralNetworks/venv/lib/python3.12/site-packages/neurolab/net.py", line 38, in <module>
    from . import trans
  File "NeuralNetworks/venv/lib/python3.12/site-packages/neurolab/trans.py", line 51, in <module>
    class PureLin:
  File "NeuralNetworks/venv/lib/python3.12/site-packages/neurolab/trans.py", line 70, in PureLin
    out_minmax = [-np.Inf, np.Inf]

Looks like the fix is simple: update numpy andnp.Inf should be replaced with np.inf.

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