Skip to content

Commit

Permalink
Update _event_matvec.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Routhleck committed Feb 29, 2024
1 parent 32fa658 commit 7c950bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion brainpy/_src/math/jitconn/_event_matvec.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,11 @@ def event_mv_prob_homo_taichi(
if isinstance(weight, float): weight = as_jax(weight)
print(weight.shape)
print(weight)
weight = jnp.atleast_1d(as_jax(weight))
try:
weight = jnp.atleast_1d(as_jax(weight))
except:
print(f'weight_value:{weight}')
print(f'weight_shape:{weight.shape}')
conn_len = jnp.ceil(1 / conn_prob) * 2 - 1
conn_len = jnp.asarray(jnp.atleast_1d(conn_len), dtype=jnp.int32)
if seed is None:
Expand Down

0 comments on commit 7c950bd

Please sign in to comment.