Skip to content

Commit 5a64c61

Browse files
committed
tests passing, using in gio
1 parent 71b2b2b commit 5a64c61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unmap/unmap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ def get_cmap(cmap, arr=None, levels=256, quantize=False):
145145
raise TypeError("cmap must be a str (name of a matplotlib cmap) or an array-like.")
146146

147147
if (cmap.ndim == 1) and (cmap.size == 4):
148-
cmap = crop_out(arr, cmap, force_landscape=True, reduce=np.mean)
148+
cmap = crop_out(arr, cmap)
149149

150150
if quantize:
151151
cmap, _ = kmeans(cmap, levels)
152152

153153
if (cmap.ndim == 3) and (cmap.shape[0] > cmap.shape[1]):
154154
# Then it is a vertical rectangle.
155-
cmap = np.swapaxes(cmap, 0, 1)
155+
cmap = np.swapaxes(cmap[::-1], 0, 1)
156156

157157
if (cmap.ndim == 3):
158158
cmap = np.mean(cmap, axis=0)

0 commit comments

Comments
 (0)