Update noisereduce.py (#63)

I noticed that when the argument `use_tqdm` is set to `False`, progression bars appears. I made this small change and it seemed to behave correctly.
I think it is due to the fact that tqdm arguments asks the opposite (set disable to `True` then no progress bars are shown).   
I found this tricky to spot especially when other libraries or personal code uses tqdm in parallel.
This commit is contained in:
Ali Saghiran
2022-04-13 19:06:19 +02:00
committed by GitHub
parent 6d268737e9
commit fde4cebae8

View File

@@ -224,7 +224,7 @@ class SpectralGate:
Parallel(n_jobs=self.n_jobs)(delayed(self._iterate_chunk)(filtered_chunk, pos, end0, start0, ich)
for pos, start0, end0, ich in zip(
tqdm(pos_list, disable=self.use_tqdm), start_list, end_list, range(ich1, ich2 + 1)
tqdm(pos_list, disable=not(self.use_tqdm)), start_list, end_list, range(ich1, ich2 + 1)
)
)
if self.flat: