def mark_noise(self, noise, nw=None):
"""Mark noisy samples in the buffer.
Mark the last `nw` samples in the buffer as noisy (noisy -> True;
clean -> False).
Args:
noise (bool): if True, mark the last nw samples as noise
Keyword Args:
nw (int): number of samples to mark as noise. If None, use n
points.
"""
if not nw:
nw = self.n
ind = np.arange(self.ind - nw, self.ind, dtype=np.int16) % self.n
self.noise[ind, :] = noise
评论列表
文章目录