We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2b2a15 commit 237a496Copy full SHA for 237a496
brainpy/_src/initialize/tests/test_regular_inits.py
@@ -20,7 +20,6 @@ def test_one_init(self):
20
init = bp.init.OneInit(value=value)
21
weights = init(size)
22
assert weights.shape == size
23
- assert isinstance(weights, bp.math.ndarray)
24
assert (weights == value).all()
25
26
brainpy/_src/math/ndarray.py
@@ -93,7 +93,7 @@ def _check_input_array(array):
93
94
95
def _return(a):
96
- if _return_bp_array and isinstance(a, jax.Array) and a.ndim > 1:
+ if _return_bp_array and isinstance(a, jax.Array) and a.ndim > 0:
97
return Array(a)
98
return a
99
0 commit comments