Skip to content

Commit f46e78b

Browse files
authored
Merge pull request #325 from chaoming0625/master
Upgrade ``brainpy.math.Array`` for future extensions
2 parents 7ba3968 + 5bc735c commit f46e78b

File tree

6 files changed

+148
-435
lines changed

6 files changed

+148
-435
lines changed

brainpy/_src/dyn/tests/test_dyn_runner.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class TestDSRunner(unittest.TestCase):
1010
def test1(self):
11-
class ExampleDS(bp.dyn.DynamicalSystem):
11+
class ExampleDS(bp.DynamicalSystem):
1212
def __init__(self):
1313
super(ExampleDS, self).__init__()
1414
self.i = bm.Variable(bm.zeros(1))
@@ -17,23 +17,23 @@ def update(self, tdi):
1717
self.i += 1
1818

1919
ds = ExampleDS()
20-
runner = bp.dyn.DSRunner(ds, dt=1., monitors=['i'], progress_bar=False)
20+
runner = bp.DSRunner(ds, dt=1., monitors=['i'], progress_bar=False)
2121
runner.run(100.)
2222

2323
def test_t_and_dt(self):
24-
class ExampleDS(bp.dyn.DynamicalSystem):
24+
class ExampleDS(bp.DynamicalSystem):
2525
def __init__(self):
2626
super(ExampleDS, self).__init__()
2727
self.i = bm.Variable(bm.zeros(1))
2828

2929
def update(self, tdi):
3030
self.i += 1 * tdi.dt
3131

32-
runner = bp.dyn.DSRunner(ExampleDS(), dt=1., monitors=['i'], progress_bar=False)
32+
runner = bp.DSRunner(ExampleDS(), dt=1., monitors=['i'], progress_bar=False)
3333
runner.run(100.)
3434

3535
def test_DSView(self):
36-
class EINet(bp.dyn.Network):
36+
class EINet(bp.Network):
3737
def __init__(self, scale=1.0, method='exp_auto'):
3838
super(EINet, self).__init__()
3939

brainpy/_src/math/index_tricks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import abc
22

33
from jax import core
4-
from .numpy_ops import arange, array, concatenate, expand_dims, linspace, meshgrid, stack, transpose
4+
from .arraycompatible import arange, array, concatenate, expand_dims, linspace, meshgrid, stack, transpose
55
import numpy as np
66

77
__all__ = ["c_", "index_exp", "mgrid", "ogrid", "r_", "s_"]

0 commit comments

Comments
 (0)