|
8 | 8 | from brainpy.integrators.joint_eq import JointEq |
9 | 9 | from brainpy.integrators.ode import odeint |
10 | 10 | from brainpy.integrators.sde import sdeint |
11 | | -from brainpy.modes import Mode, BatchingMode, TrainingMode, NormalMode, normal, check |
| 11 | +from brainpy.modes import Mode, BatchingMode, TrainingMode, NormalMode, normal, check_mode |
12 | 12 | from brainpy.tools.checking import check_initializer |
13 | 13 | from brainpy.types import Shape, Array |
14 | 14 |
|
@@ -219,7 +219,7 @@ def __init__( |
219 | 219 | keep_size=keep_size, |
220 | 220 | name=name, |
221 | 221 | mode=mode) |
222 | | - check(self.mode, (BatchingMode, NormalMode), self.__class__.__name__) |
| 222 | + check_mode(self.mode, (BatchingMode, NormalMode), self.__class__.__name__) |
223 | 223 |
|
224 | 224 | # parameters |
225 | 225 | self.ENa = parameter(ENa, self.varshape, allow_none=False) |
@@ -427,7 +427,7 @@ def __init__( |
427 | 427 | keep_size=keep_size, |
428 | 428 | name=name, |
429 | 429 | mode=mode) |
430 | | - check(self.mode, (BatchingMode, NormalMode), self.__class__) |
| 430 | + check_mode(self.mode, (BatchingMode, NormalMode), self.__class__) |
431 | 431 |
|
432 | 432 | # params |
433 | 433 | self.V_Ca = parameter(V_Ca, self.varshape, allow_none=False) |
@@ -685,7 +685,7 @@ def __init__( |
685 | 685 | keep_size=keep_size, |
686 | 686 | name=name, |
687 | 687 | mode=mode) |
688 | | - check(self.mode, (NormalMode, BatchingMode), self.__class__) |
| 688 | + check_mode(self.mode, (NormalMode, BatchingMode), self.__class__) |
689 | 689 |
|
690 | 690 | # conductance parameters |
691 | 691 | self.gAHP = parameter(gAHP, self.varshape, allow_none=False) |
@@ -994,7 +994,7 @@ def __init__( |
994 | 994 | ): |
995 | 995 | # initialization |
996 | 996 | super(WangBuzsakiModel, self).__init__(size=size, keep_size=keep_size, name=name, mode=mode) |
997 | | - check(self.mode, (BatchingMode, NormalMode), self.__class__) |
| 997 | + check_mode(self.mode, (BatchingMode, NormalMode), self.__class__) |
998 | 998 |
|
999 | 999 | # parameters |
1000 | 1000 | self.ENa = parameter(ENa, self.varshape, allow_none=False) |
|
0 commit comments