def save_np(reader, output_filename): ts, data = reader.read_stack() np.savez(output_filename, timestamps=ts, data=data)