Skip to content

Commit

Permalink
Reverted change of NodeCollection creation
Browse files Browse the repository at this point in the history
It is moved to a separate branch.
  • Loading branch information
hakonsbm committed Apr 22, 2020
1 parent e867b52 commit a3cc3ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion nestkernel/node_collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ NodeCollection::create_( const std::vector< index >& node_ids )

std::vector< NodeCollectionPrimitive > parts;

index old_node_id = current_first;
index old_node_id = 0;
for ( auto node_id = ++( node_ids.begin() ); node_id != node_ids.end(); ++node_id )
{
if ( *node_id == old_node_id )
Expand Down
11 changes: 0 additions & 11 deletions pynest/nest/tests/test_NodeCollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,17 +333,6 @@ def test_correct_len_on_NodeCollection(self):
c = c[3:17:4]
self.assertEqual(len(c), 4)

def test_raises_with_nonunique_nodes(self):
"""Non-unique nodes in NodeCollection raises error"""
n = nest.Create('iaf_psc_alpha', 10)

with self.assertRaises(nest.kernel.NESTError):
n[1:3] + n[2:5]
with self.assertRaises(nest.kernel.NESTError):
nest.NodeCollection([2, 2])
with self.assertRaises(nest.kernel.NESTError):
nest.NodeCollection([2]) + nest.NodeCollection([1, 2])

def test_composite_NodeCollection(self):
"""Tests composite NodeCollection with patched node IDs"""

Expand Down

0 comments on commit a3cc3ed

Please sign in to comment.