def _write(self, samples, keyvals):
"""Write new metadata to the Digital Metadata channel.
This function does no input checking, see `write` for that.
Parameters
----------
samples : 1-D numpy array of type uint64 sorted in ascending order
An array of sample indices, given in the number of samples since
the epoch (time_since_epoch*sample_rate).
keyvals : iterable of iterables same length as `samples`
Each element of this iterable corresponds to a sample in `samples`
and should be another iterable that produces (key, value) pairs to
write for that sample.
"""
grp_iter = self._sample_group_generator(samples)
for grp, keyval in zip(grp_iter, keyvals):
for key, val in keyval:
if val is not None:
grp.create_dataset(key, data=val)
评论列表
文章目录