Skip to content

Commit 8bd71d3

Browse files
committed
updates
1 parent 4a4d138 commit 8bd71d3

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

brainpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
# fundamental modules
7-
from . import errors, tools, check, modes
7+
from . import check, errors, tools, modes
88

99
# "base" module
1010
from . import base

brainpy/check.py

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,7 @@
1111

1212
_check = True
1313

14-
_BRAINPYLIB_MINIMAL_VERSION = '0.1.2'
15-
16-
17-
def is_checking():
18-
"""Whether the checking is turn on."""
19-
return _check
20-
21-
22-
def turn_on():
23-
"""Turn on the checking."""
24-
global _check
25-
_check = True
26-
27-
28-
def turn_off():
29-
"""Turn off the checking."""
30-
global _check
31-
_check = False
14+
_BRAINPYLIB_MINIMAL_VERSION = '0.1.3'
3215

3316

3417
try:
@@ -62,6 +45,7 @@ def turn_off():
6245
6346
''') from None
6447

48+
6549
try:
6650
import brainpylib
6751

@@ -79,3 +63,23 @@ def turn_off():
7963
f'Please install "brainpylib>={_BRAINPYLIB_MINIMAL_VERSION}" through:\n\n'
8064
f'>>> pip install brainpylib'
8165
)
66+
67+
68+
def is_checking():
69+
"""Whether the checking is turn on."""
70+
return _check
71+
72+
73+
def turn_on():
74+
"""Turn on the checking."""
75+
global _check
76+
_check = True
77+
78+
79+
def turn_off():
80+
"""Turn off the checking."""
81+
global _check
82+
_check = False
83+
84+
85+

brainpy/math/ndarray.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def _check_input_array(array):
9494
class Array(object):
9595
"""Multiple-dimensional array in JAX backend.
9696
"""
97+
98+
is_brainpy_array = True
9799
__slots__ = ("_value", "_transform_context")
98100

99101
def __init__(self, value, dtype=None):

0 commit comments

Comments
 (0)