@@ -267,7 +267,7 @@ def release(self, f):
267
267
268
268
def __repr__ (self ):
269
269
return f'ML_Logger(root="{ self .root } ",' + "\n " + \
270
- f' prefix="{ self .prefix } ")'
270
+ f' prefix="{ self .prefix } ")'
271
271
272
272
# noinspection PyInitNewSignature
273
273
# todo: use prefixes as opposed to prefix. (add *prefixae after prefix=None)
@@ -1524,10 +1524,7 @@ def save_images(self, stack, key, n_rows=None, n_cols=None, cmap=None, normalize
1524
1524
:return: None
1525
1525
"""
1526
1526
# Check dtype is supported by ml-logger
1527
- assert (
1528
- dtype in ALLOWED_TYPES ,
1529
- f"Unsupported dtype: { dtype } . Supported types: { ALLOWED_TYPES } "
1530
- )
1527
+ assert dtype in ALLOWED_TYPES , f"Unsupported dtype: { dtype } . Supported types: { ALLOWED_TYPES } "
1531
1528
1532
1529
stack = stack if hasattr (stack , 'dtype' ) else np .stack (stack )
1533
1530
@@ -1597,10 +1594,8 @@ def save_images(self, stack, key, n_rows=None, n_cols=None, cmap=None, normalize
1597
1594
)
1598
1595
1599
1596
# this needs to be updated
1600
- assert (
1601
- any (np .issubdtype (stack .dtype , t ) for t in ALLOWED_TYPES ),
1597
+ assert any (np .issubdtype (stack .dtype , t ) for t in ALLOWED_TYPES ), \
1602
1598
f"the image type need to be one of { ALLOWED_TYPES } "
1603
- )
1604
1599
n , h , w , * c = stack .shape
1605
1600
# todo: add color background -- need to decide on which library to use.
1606
1601
composite = np .full ([h * n_rows , w * n_cols , * c ], background , dtype = dtype )
0 commit comments