brainpy/examples

error on numpy_ops.py

Opened this issue · 1 comments

I try the https://brainpy-examples.readthedocs.io/en/latest/neurons/JR_1995_jansen_rit_model.html

python jansen_rit_model_001.py
Traceback (most recent call last):
  File "C:\PythonProjects\test_brainmodels\jansen_rit_model_001.py", line 1, in <module>
    import brainpy as bp
  File "C:\Python312\Lib\site-packages\brainpy\__init__.py", line 28, in <module>
    from . import math
  File "C:\Python312\Lib\site-packages\brainpy\math\__init__.py", line 35, in <module>
    from .delayvars import *
  File "C:\Python312\Lib\site-packages\brainpy\math\delayvars.py", line 12, in <module>
    from brainpy.math import numpy_ops as bm
  File "C:\Python312\Lib\site-packages\brainpy\math\numpy_ops.py", line 354, in <module>
    @wraps(jnp.in1d)
           ^^^^^^^^
  File "C:\Python312\Lib\site-packages\jax\_src\deprecations.py", line 54, in getattr
    raise AttributeError(f"module {module!r} has no attribute {name!r}")
AttributeError: module 'jax.numpy' has no attribute 'in1d'. Did you mean: 'int16'?

Thanks for the report. This error is usually caused by the nonmatched python. Currently, BrainPy is best supported in Python 3.9-3.11. Please do not install the brainpy package in Python 3.12.