In [1]:
import numpy as np
In [2]:
import skimage.util
In [3]:
a = np.arange(1, 7).reshape(2, 3)
print(a)
In [4]:
b = a * 10
print(b)
In [5]:
c = a * 100
print(c)
In [6]:
m = skimage.util.montage([a, b, c])
print(m)
In [7]:
print(m.shape)
In [8]:
abc = np.array([a, b, c])
print(abc)
In [9]:
print(abc.shape)
In [10]:
print(skimage.util.montage(abc))
In [11]:
d = a[:, :2]
print(d)
In [12]:
# skimage.util.montage([a, b, c, d])
# ValueError: could not broadcast input array from shape (2,3) into shape (2)
In [13]:
print(np.mean(np.array([a, b, c])))
In [14]:
print(skimage.util.montage([a, b, c], fill=0))
In [15]:
print(skimage.util.montage([a, b, c], grid_shape=(1, 3)))
In [16]:
print(skimage.util.montage([a, b, c], grid_shape=(3, 1)))
In [17]:
# print(skimage.util.montage([a, b, c], grid_shape=(1, 2)))
# IndexError: list index out of range
In [18]:
print(skimage.util.montage([a, b, c], grid_shape=(2, 3)))
In [19]:
print(skimage.util.montage([a, b, c], grid_shape=(2, 3), fill=0))
In [20]:
print(skimage.util.montage([a, b, c], padding_width=1))
In [21]:
print(skimage.util.montage([a, b, c], padding_width=1, fill=0))