Skip to content

Commit

Permalink
Implement Assembly.node_collection
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Jul 1, 2021
1 parent 86d395e commit fc7530c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e # stop execution in case of errors

if [ "$TRAVIS_PYTHON_VERSION" == "3.8" ]; then
python setup.py nosetests --with-coverage --cover-package=pyNN -v --tests=test;
python setup.py nosetests --nologcapture --with-coverage --cover-package=pyNN -v --tests=test;
else
python setup.py nosetests -e backends -v --tests=test/unittests;
python setup.py nosetests --nologcapture -e backends -v --tests=test/unittests;
fi
8 changes: 8 additions & 0 deletions pyNN/nest/populations.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ def local_node_collection(self):
result += p.local_node_collection
return result

@property
def node_collection(self):
return sum((p.node_collection for p in self.populations[1:]),
start=self.populations[0].node_collection)


class PopulationView(common.PopulationView, PopulationMixin):
__doc__ = common.PopulationView.__doc__
Expand Down Expand Up @@ -214,3 +219,6 @@ def _set_initial_value_array(self, variable, value):
# and raise an Exception if not, rather than just emit a warning.
else:
raise



0 comments on commit fc7530c

Please sign in to comment.