Skip to content

Commit 32175b2

Browse files
committed
fix parameter() bug
1 parent c12d316 commit 32175b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

brainpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
__version__ = "2.2.3.4"
3+
__version__ = "2.2.3.5"
44

55

66
try:

brainpy/initialize/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def parameter(
7575
else:
7676
raise ValueError(f'Unknown param type {type(param)}: {param}')
7777
if allow_scalar:
78-
if param.shape == () or param.shape != (1,):
78+
if param.shape == () or param.shape == (1,):
7979
return param
8080
if param.shape != size:
8181
raise ValueError(f'The shape of the parameters should be {size}, but we got {param.shape}')

0 commit comments

Comments
 (0)