Skip to content

Commit 147d3e8

Browse files
authored
fix parameter() bug (#286)
fix `parameter()` bug
2 parents f3e7d72 + 450fc07 commit 147d3e8

File tree

8 files changed

+16
-18
lines changed

8 files changed

+16
-18
lines changed

.github/workflows/Windows_CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
python -m pip install numpy>=1.21.0
3232
python -m pip install "jaxlib==0.3.14" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
3333
python -m pip install https://github.com/google/jax/archive/refs/tags/jax-v0.3.14.tar.gz
34-
python -m pip install -r requirements-win.txt
34+
python -m pip install -r requirements-dev.txt
3535
python -m pip install tqdm brainpylib
3636
python setup.py install
3737
- name: Lint with flake8

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}')

brainpy/math/tests/test_numpy_einsum.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
18+
import pytest
19+
pytest.skip("No need to test.", allow_module_level=True)
20+
21+
1722
import itertools
1823
from collections import defaultdict
1924
from functools import partial

brainpy/math/tests/test_numpy_indexing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717

1818
import pytest
19+
pytest.skip("No need to test.", allow_module_level=True)
20+
1921
import enum
2022
import itertools
2123
import typing

brainpy/math/tests/test_numpy_ops.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515

1616
import pytest
17+
pytest.skip("No need to test.", allow_module_level=True)
18+
1719
import collections
1820
import functools
1921
from functools import partial

requirements-dev.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
-r requirements.txt
2-
1+
numpy>=1.15
2+
jax>=0.3.0
3+
tqdm
34
numba
45
matplotlib>=3.4
56
jaxlib>=0.3.0
@@ -11,3 +12,4 @@ pillow
1112

1213
# test requirements
1314
pytest
15+
absl-py

requirements-win.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)