# -*- coding: utf-8 -*-
'''
This module implements :class:`SpikeTrain`, an array of spike times.
:waveforms: (quantity array 3D (spike, channel_index, time))
The waveforms of each spike.
:sort: (bool) If True, the spike train will be sorted by time.
stack = np.concatenate((np.asarray(self), np.asarray(other)))
sorting = np.argsort(stack)
stack = stack[sorting]
kwargs = {}
kwargs['array_annotations'] = self.
_merge_array_annotations(other, sorting=sorting)
for name in ("name", "description", "file_origin
wfs_stack = np.vstack((self.waveforms, other.waveforms))
wfs_stack = wfs_stack[sorting
Apart from that the array_annotations need to be sorted according to the sorting of
the spikes
:return Merged array_annotations
'''
assert sorting is not None, "The order of the merged
arr_ann = np.concatenate([self_ann, other_ann])
merged_array_annotations[key] = arr_ann[sorting