mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-12-22 22:25:01 +00:00
fix crash 'cause we're only plotting 1 thing
This commit is contained in:
parent
3787155665
commit
be7dd91f88
1 changed files with 2 additions and 0 deletions
|
@ -247,6 +247,8 @@ def get_overlay(image, coloured_mask):
|
|||
|
||||
def plot_samples_matplotlib(filepath, display_list, figsize=(5, 3)):
|
||||
_, axes = plt.subplots(nrows=1, ncols=len(display_list), figsize=figsize)
|
||||
if not isinstance(axes, list):
|
||||
axes = [ axes ]
|
||||
for i in range(len(display_list)):
|
||||
if display_list[i].shape[-1] == 3:
|
||||
axes[i].imshow(tf.keras.preprocessing.image.array_to_img(display_list[i]))
|
||||
|
|
Loading…
Reference in a new issue