Skip to content

Commit 49b0dc8

Browse files
committed
fix bugs
1 parent 237a496 commit 49b0dc8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

brainpy/_src/analysis/constants.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33

44
__all__ = [
5-
'CONTINUOUS',
6-
'DISCRETE',
7-
85
'F_vmap_fx',
96
'F_vmap_fy',
107
'F_vmap_brentq_fx',

brainpy/_src/math/random.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,8 +973,8 @@ def wald(self, mean, scale, size=None, key=None):
973973
if size is None:
974974
size = lax.broadcast_shapes(jnp.shape(mean), jnp.shape(scale))
975975
size = _size2shape(size)
976-
sampled_chi2 = jnp.square(self.randn(*size))
977-
sampled_uniform = self.uniform(size=size, key=key)
976+
sampled_chi2 = jnp.square(_as_jax_array(self.randn(*size)))
977+
sampled_uniform = _as_jax_array(self.uniform(size=size, key=key))
978978
# Wikipedia defines an intermediate x with the formula
979979
# x = loc + loc ** 2 * y / (2 * conc) - loc / (2 * conc) * sqrt(4 * loc * conc * y + loc ** 2 * y ** 2)
980980
# where y ~ N(0, 1)**2 (sampled_chi2 above) and conc is the concentration.

brainpy/analysis.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
SlowPointFinder as SlowPointFinder,
1818
)
1919

20+
from brainpy._src.analysis.constants import (CONTINUOUS as CONTINUOUS,
21+
DISCRETE as DISCRETE)
22+
2023
from brainpy._src.analysis import plotstyle, stability, constants
2124
C = constants
2225

0 commit comments

Comments
 (0)