File tree Expand file tree Collapse file tree 3 files changed +25
-19
lines changed Expand file tree Collapse file tree 3 files changed +25
-19
lines changed Original file line number Diff line number Diff line change 44
55
66# fundamental modules
7- from . import errors , tools , check , modes
7+ from . import check , errors , tools , modes
88
99# "base" module
1010from . import base
Original file line number Diff line number Diff line change 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
3417try :
@@ -62,6 +45,7 @@ def turn_off():
6245
6346 ''' ) from None
6447
48+
6549try :
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+
Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ def _check_input_array(array):
9494class 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 ):
You can’t perform that action at this time.
0 commit comments