convert_to_change_arrays
- caqtus.shot_compilation.timed_instructions.convert_to_change_arrays(
- sequence: TimedInstruction,
Convert a sequence to arrays of change times and values.
- Parameters:
sequence – The sequence to convert.
- Returns:
Two arrays, the first containing times indexes at which the values of the sequence change, and the second containing the corresponding values for each change. The time array will have dtype np.int64 and the value array will have the same dtype as the sequence passed in argument.