Skip to content

Commit

Permalink
Remove padding for mosaic in plot.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankong committed Aug 20, 2019
1 parent 15352a4 commit 5f6bab0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sigpy/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,7 @@ def array_to_image(arr, color=False):
"""
if color:
arr = np.divide(arr, np.abs(arr).max(),
out=np.zeros_like(arr), where=arr != 0)
arr = arr / np.abs(arr).max()

if arr.ndim == 2:
return arr
Expand All @@ -525,8 +524,6 @@ def array_to_image(arr, color=False):
else:
ndim = 2

arr = sp.resize(arr, arr.shape[:-2] +
(arr.shape[-2] + 2, arr.shape[-1] + 2))
shape = arr.shape
batch = sp.prod(shape[:-ndim])
mshape = mosaic_shape(batch)
Expand Down

0 comments on commit 5f6bab0

Please sign in to comment.