From 6fd403f079319b6b96d64aaf38a161d8cda0a69d Mon Sep 17 00:00:00 2001 From: Anwar Nunez-Elizalde Date: Thu, 17 Jun 2021 13:47:08 +0100 Subject: [PATCH] ENH: optional tqdm --- moten/extras.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/moten/extras.py b/moten/extras.py index bc41bf6..e202e3f 100644 --- a/moten/extras.py +++ b/moten/extras.py @@ -7,8 +7,12 @@ pointwise_square, ) -with_tqdm = False - +# Make tqdm optional +with_tqdm = True +try: + from tqdm import tqdm +except ImportError: + with_tqdm = False def pixbypix_covariance_from_frames_generator(data_generator, batch_size=1000,