Skip to content

Commit

Permalink
Add get_image_grid_from_dict function to utils/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoadesScholar committed Sep 11, 2024
1 parent eb4f76b commit 275a190
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cellmap_data/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from .figs import get_image_grid, get_image_dict
from .figs import get_image_grid, get_image_dict, get_image_grid_from_dict
from .dtype import torch_max_value
1 change: 1 addition & 0 deletions src/cellmap_data/utils/figs.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def get_image_grid_numpy(
data = np.frombuffer(buff.getvalue(), dtype=np.uint8)
w, h = fig.canvas.get_width_height()
im = data.reshape((int(h), int(w), -1))
plt.close("all")
return im


Expand Down

0 comments on commit 275a190

Please sign in to comment.