Skip to content

Commit fbc7cc4

Browse files
authored
Force memory allocation in merge_arrs (#957)
1 parent 4e13c7a commit fbc7cc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

strax/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ def merge_arrs(arrs, dtype=None, replacing=False):
216216
for arr in arrs:
217217
for fn in arr.dtype.names:
218218
if fn in result.dtype.names:
219-
result[fn] = arr[fn]
219+
# the copy here is needed to avoid cross-talk between memory of arrays
220+
result[fn] = np.copy(arr[fn])
220221
return result
221222

222223

0 commit comments

Comments
 (0)