Skip to content

Commit ebf78ec

Browse files
committed
fix shen bug
1 parent 949cf67 commit ebf78ec

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.114
1+
0.8.115

ml_logger/ml_logger.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def release(self, f):
267267

268268
def __repr__(self):
269269
return f'ML_Logger(root="{self.root}",' + "\n" + \
270-
f' prefix="{self.prefix}")'
270+
f' prefix="{self.prefix}")'
271271

272272
# noinspection PyInitNewSignature
273273
# 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
15241524
:return: None
15251525
"""
15261526
# 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}"
15311528

15321529
stack = stack if hasattr(stack, 'dtype') else np.stack(stack)
15331530

@@ -1597,10 +1594,8 @@ def save_images(self, stack, key, n_rows=None, n_cols=None, cmap=None, normalize
15971594
)
15981595

15991596
# 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), \
16021598
f"the image type need to be one of {ALLOWED_TYPES}"
1603-
)
16041599
n, h, w, *c = stack.shape
16051600
# todo: add color background -- need to decide on which library to use.
16061601
composite = np.full([h * n_rows, w * n_cols, *c], background, dtype=dtype)

0 commit comments

Comments
 (0)