Skip to content

Commit ac1ac12

Browse files
authored
Ready for publish (#311)
Ready for publish
2 parents 5abd7fc + ad4837e commit ac1ac12

File tree

13 files changed

+29
-677
lines changed

13 files changed

+29
-677
lines changed

brainpy/__init__.py

Lines changed: 1 addition & 2 deletions
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
@@ -25,7 +25,6 @@
2525
optimizers, # gradient descent optimizers
2626
losses, # loss functions
2727
measure, # methods for data analysis
28-
datasets, # methods for generating data
2928
inputs, # methods for generating input currents
3029
algorithms, # online or offline training algorithms
3130
)

brainpy/check.py

Lines changed: 24 additions & 20 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,20 +45,41 @@ def turn_off():
6245
6346
''') from None
6447

48+
6549
try:
6650
import brainpylib
6751

6852
if brainpylib.__version__ < _BRAINPYLIB_MINIMAL_VERSION:
6953
raise PackageMissingError(
70-
f'brainpy need "brainpylib>={_BRAINPYLIB_MINIMAL_VERSION}". \n'
54+
f'\nbrainpy need "brainpylib>={_BRAINPYLIB_MINIMAL_VERSION}". \n'
7155
f'Please install it through:\n\n'
7256
f'>>> pip install brainpylib -U'
7357
)
7458

7559
del brainpylib
7660
except ModuleNotFoundError:
7761
raise PackageMissingError(
78-
f'brainpy need "brainpylib>={_BRAINPYLIB_MINIMAL_VERSION}". \n'
62+
f'\nbrainpy need "brainpylib>={_BRAINPYLIB_MINIMAL_VERSION}". \n'
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/datasets/__init__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

brainpy/datasets/chaos/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)