Skip to content

Commit 192af21

Browse files
committed
Flake8
1 parent a0026c1 commit 192af21

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

examples/external_devices_examples/pushbot_light_follower.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
# The events coming from the specified columns of exc_pop population
102102
# will be connected to the relevant neuron in driver_pop
103103
# Starting column of the left-side column group
104-
start_of_left = 0
104+
start_of_left = 20
105105

106106
# Last column of the left-side column group
107107
end_of_left = n_conn
@@ -110,7 +110,7 @@
110110
start_of_right = retina_resolution.value.pixels - n_conn
111111

112112
# Last column of the right-side column group
113-
end_of_right = retina_resolution.value.pixels
113+
end_of_right = retina_resolution.value.pixels - 20
114114

115115
# First row to consider in any group of pixels
116116
# (i.e. ignore bright top lights)
@@ -130,16 +130,18 @@
130130
arr = numpy.arange(retina_resolution.value.n_neurons / 2)
131131

132132
# Determines which neuron IDs are on the left group
133-
id_to_left = (arr % retina_resolution.value.pixels) < end_of_left
134133
id_to_left = (
135-
(arr // retina_resolution.value.pixels >= start_row)
136-
& (arr // retina_resolution.value.pixels < end_row)) & id_to_left
134+
(arr % retina_resolution.value.pixels) >= start_of_left
135+
& (arr % retina_resolution.value.pixels) < end_of_left
136+
& (arr // retina_resolution.value.pixels >= start_row)
137+
& (arr // retina_resolution.value.pixels < end_row))
137138

138139
# Determines which neuron IDs are on the right group
139-
id_to_right = (arr % retina_resolution.value.pixels) >= start_of_right
140140
id_to_right = (
141-
(arr // retina_resolution.value.pixels >= start_row)
142-
& (arr // retina_resolution.value.pixels < end_row)) & id_to_right
141+
(arr % retina_resolution.value.pixels) >= start_of_right
142+
& (arr % retina_resolution.value.pixels) < end_of_right
143+
& (arr // retina_resolution.value.pixels >= start_row)
144+
& (arr // retina_resolution.value.pixels < end_row))
143145

144146
# Extracts the neuron IDs to be connected to the left neuron of driver_pop
145147
id_to_left = numpy.extract(id_to_left, arr)

0 commit comments

Comments
 (0)