Skip to content

Commit

Permalink
More memory-efficient load of templates
Browse files Browse the repository at this point in the history
  • Loading branch information
DradeAW committed Feb 26, 2024
1 parent d80aa4c commit 984e3c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/MEArec/generators/recordinggenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,9 @@ def generate_recordings(
template_locs = np.array(locs)[reordered_idx_cells]
template_rots = np.array(rots)[reordered_idx_cells]
template_bin = np.array(bin_cat)[reordered_idx_cells]
templates = np.array(eaps)[reordered_idx_cells]
templates = np.empty((len(reordered_idx_cells), *eaps.shape[1:]), dtype=eaps.dtype)
for i, reordered_idx in enumerate(reordered_idx_cells):
templates[i] = eaps[reordered_idx]
self.template_ids = reordered_idx_cells
else:
print(f"Using provided template ids: {self.template_ids}")
Expand Down

0 comments on commit 984e3c4

Please sign in to comment.