Skip to content

Commit ebfa420

Browse files
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent eb55531 commit ebfa420

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bioimageio/core/build_spec/build_model.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,10 @@ def write_im(path, im, axes):
408408

409409
# create better cover images for 3d data and non-image outputs
410410
def _generate_covers(in_path, out_path, input_axes, output_axes, root):
411-
412411
def normalize(data, axis, eps=1e-7):
413-
data = data.astype('float32')
412+
data = data.astype("float32")
414413
data -= data.min(axis=axis, keepdims=True)
415-
data /= (data.max(axis=axis, keepdims=True) + eps)
414+
data /= data.max(axis=axis, keepdims=True) + eps
416415
return data
417416

418417
def to_image(data, data_axes):
@@ -478,7 +477,7 @@ def grid_im(im0, im1):
478477
n, m = im_shape
479478
x, y = ims_per_row * n, n_rows * m
480479
out = np.zeros((3, y, x))
481-
images = [im0] + [np.repeat(im1[i:i+1], 3, axis=0) for i in range(n_chan)]
480+
images = [im0] + [np.repeat(im1[i : i + 1], 3, axis=0) for i in range(n_chan)]
482481

483482
i, j = 0, 0
484483
for im in images:

0 commit comments

Comments
 (0)