Skip to content

error on numpy_ops.py #12

Open
Open

Description

@catafest

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'?

Activity

  1. chaoming0625 commented on Apr 7, 2024

    @chaoming0625
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions