diff --git a/spynnaker/pyNN/models/neural_projections/connectors/one_to_one_connector.py b/spynnaker/pyNN/models/neural_projections/connectors/one_to_one_connector.py index 755bd8c7d3..608d7d6f1b 100644 --- a/spynnaker/pyNN/models/neural_projections/connectors/one_to_one_connector.py +++ b/spynnaker/pyNN/models/neural_projections/connectors/one_to_one_connector.py @@ -200,14 +200,8 @@ def get_connected_vertices( s_info.partition_id) # If doing a view, we must be single dimensional, so use old method - if s_info.prepop_is_view or s_info.postpop_is_view: - - # Check again here in case the rules change elsewhere - if (len(s_info.pre_vertex.atoms_shape) > 1 or - len(s_info.post_vertex.atoms_shape) > 1): - raise ConfigurationException( - "The OneToOneConnector does not support PopulationView " - "connections between vertices with more than 1 dimension") + if (len(s_info.pre_vertex.atoms_shape) == 1 and + len(s_info.post_vertex.atoms_shape) == 1): pre_lo = 0 pre_hi = source_vertex.n_atoms - 1 @@ -225,6 +219,13 @@ def get_connected_vertices( s_vert, pre_lo, pre_hi, t_vert, post_lo, post_hi)]) for t_vert in tgt_vtxs] + if s_info.prepop_is_view or s_info.postpop_is_view: + + # Check again here in case the rules change elsewhere + raise ConfigurationException( + "The OneToOneConnector does not support PopulationView " + "connections between vertices with more than 1 dimension") + # Check for cross over of pre- and post- rasters, as that is how the # connector works return [(t_vert, diff --git a/unittests/model_tests/neuron/test_synaptic_manager.py b/unittests/model_tests/neuron/test_synaptic_manager.py index c4d619c4ec..e3b5b1b287 100644 --- a/unittests/model_tests/neuron/test_synaptic_manager.py +++ b/unittests/model_tests/neuron/test_synaptic_manager.py @@ -83,7 +83,7 @@ def write_memory( return (-1, -1) @overrides(Transceiver.get_region_base_address) - def get_region_base_address(self, x: int, y: int, p: int): + def get_region_base_address(self, x: int, y: int, p: int) -> int: return 0 @overrides(MockableTransceiver.read_memory)