Skip to content

Commit ec55a66

Browse files
committed
refactor(mixin): initialize bm with brainpy.version2.math if None
1 parent 9aa4e12 commit ec55a66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

brainpy/mixin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747

4848
def _get_bm():
4949
global bm
50+
if bm is None:
51+
from brainpy.version2 import math
52+
bm = math
53+
return bm
5054

5155

5256
class AlignPost(brainstate.mixin.Mixin):

0 commit comments

Comments
 (0)