Skip to content

Commit 704f6ed

Browse files
Update element_array_ephys/probe.py
Co-authored-by: Dimitri Yatsenko <dimitri@datajoint.com>
1 parent 48ab889 commit 704f6ed

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

element_array_ephys/probe.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,7 @@ def build_electrode_layouts(
240240
shank_cols = np.tile(range(col_count_per_shank), row_count)
241241
shank_rows = np.repeat(range(row_count), col_count_per_shank)
242242

243-
electrode_layouts = []
244-
for shank_no in range(shank_count):
245-
electrode_layouts.extend(
246-
[
243+
electrode_layouts = [
247244
{
248245
"electrode": (site_count_per_shank * shank_no) + e_id,
249246
"shank": shank_no,
@@ -252,10 +249,10 @@ def build_electrode_layouts(
252249
"x_coord": x + (shank_no * shank_spacing),
253250
"y_coord": y if y_origin == "bottom" else -y,
254251
}
252+
for shank_no in range(shank_count)
255253
for e_id, (c_id, r_id, x, y) in enumerate(
256254
zip(shank_cols, shank_rows, x_coords, y_coords)
257255
)
258256
]
259-
)
260257

261258
return electrode_layouts

0 commit comments

Comments
 (0)