|
result = np.zeros(n, dtype=dtype) |
|
for arr in arrs: |
|
for fn in arr.dtype.names: |
|
result[fn] = arr[fn] |
If you have two chunks, say a and b then you want to merge them, the result depends on the order of these two variables.
import numpy as np
import strax
n = 3
a = np.empty(n, dtype=strax.time_fields)
a['time'] = range(n)
b = np.empty(n, dtype=strax.time_fields)
b['time'] = a['time'][::-1]
print(a['time'])
print(b['time'])
print(strax.merge_arrs([a, b])['time'])
output:
at least a warning should be shown in such cases.
strax/strax/utils.py
Lines 204 to 207 in 8389ea6
If you have two chunks, say
aandbthen you want to merge them, the result depends on the order of these two variables.output:
at least a warning should be shown in such cases.