diff --git a/brain/compartmentReportMapping.h b/brain/compartmentReportMapping.h index 83c7a33..199e253 100644 --- a/brain/compartmentReportMapping.h +++ b/brain/compartmentReportMapping.h @@ -62,7 +62,8 @@ class CompartmentReportMapping * simulation frame buffer. * For instance, getOffsets()[1][15] retrieves the lookup index for the * frame buffer for section 15 of neuron with index 1. The neuron index is - * derived from the order in the GID set provided in the view constructor. + * derived from its positions in the sorted list of GIDs provided in the + * view constructor. * * @return the offset for each section for each neuron * @version 2.0 diff --git a/brain/python/compartmentReport.cpp b/brain/python/compartmentReport.cpp index da207e6..7d45a3b 100644 --- a/brain/python/compartmentReport.cpp +++ b/brain/python/compartmentReport.cpp @@ -96,7 +96,7 @@ bp::object CompartmentReport_getMetaData(const CompartmentReport& reader) bp::object CompartmentReportView_getGids(const CompartmentReportView& view) { - return toPythonSet(view.getGIDs()); + return toNumpy(toVector(view.getGIDs())); } CompartmentReportMappingProxy CompartmentReportView_getMapping( diff --git a/tests/brain/python/compartmentReport.py b/tests/brain/python/compartmentReport.py index 8bcaba7..c0d0116 100644 --- a/tests/brain/python/compartmentReport.py +++ b/tests/brain/python/compartmentReport.py @@ -41,7 +41,7 @@ def test_metadata(self): def test_create_view(self): view = self.report.create_view({1, 2, 3}) - assert(view.gids == {1, 2, 3}) + assert((view.gids == [1, 2, 3]).all()) def test_mapping(self): view = self.report.create_view({1, 2, 3}) @@ -116,7 +116,7 @@ class TestMemoryManagement(unittest.TestCase): def test_view(self): view = CompartmentReport(report_path).create_view({1, 2, 3}) - assert(view.gids == {1, 2, 3}) + assert((view.gids == [1, 2, 3]).all()) def test_frame(self): timestamp, frame = CompartmentReport(report_path).create_view(