Skip to content

Commit

Permalink
Fix pbar for segyio engine
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyKozhevin committed Feb 21, 2024
1 parent 91d25c5 commit e6f006c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion segfast/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
class Notifier:
""" tqdm notifier. """
def __init__(self, bar=False, total=None, **kwargs):
if 'frequency' in kwargs:
kwargs['miniters'] = kwargs.pop('frequency')
self.pbar = partial(tqdm, disable=not bar, total=total, **kwargs)

def __call__(self, iterator):
return self.pbar(iterator, total=self.total, disable=not self.pbar)
return self.pbar(iterator)

def __enter__(self):
return self.pbar()
Expand Down

0 comments on commit e6f006c

Please sign in to comment.