From f1ea1b52d7b5435edbf0d4d70d1a7015915b41ac Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Fri, 13 Sep 2024 13:28:20 +0200 Subject: [PATCH] minor fixes --- brian2/codegen/runtime/numpy_rt/numpy_rt.py | 2 +- brian2/tests/test_subgroup.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/brian2/codegen/runtime/numpy_rt/numpy_rt.py b/brian2/codegen/runtime/numpy_rt/numpy_rt.py index d56e8b855..e94211ef8 100644 --- a/brian2/codegen/runtime/numpy_rt/numpy_rt.py +++ b/brian2/codegen/runtime/numpy_rt/numpy_rt.py @@ -127,7 +127,7 @@ def __iter__(self): return iter(self.indices) # Allow conversion to a proper array with np.array(...) - def __array__(self, dtype=None, copy=None): + def __array__(self, dtype=np.int32, copy=None): if copy is False: raise ValueError("LazyArange does not support copy=False") if self.indices is None: diff --git a/brian2/tests/test_subgroup.py b/brian2/tests/test_subgroup.py index 045dab041..a141fa916 100644 --- a/brian2/tests/test_subgroup.py +++ b/brian2/tests/test_subgroup.py @@ -951,7 +951,6 @@ def test_run_regularly(): @pytest.mark.standalone_compatible def test_spike_monitor(): - set_device("cpp_standalone", directory="/tmp/testsubgroup") G = NeuronGroup(10, "v:1", threshold="v>1", reset="v=0") G.v[[0, 2, 5]] = 1.1 SG = G[3:]