From 63f1809ee09b8d79a1a22bf43e196e0f805c6956 Mon Sep 17 00:00:00 2001 From: Hauke Schulz <43613877+observingClouds@users.noreply.github.com> Date: Sat, 24 Jun 2023 09:22:12 -0700 Subject: [PATCH] fix for len(dim)==1 --- xbitinfo/graphics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xbitinfo/graphics.py b/xbitinfo/graphics.py index 32a4d6ad..2b9272c5 100644 --- a/xbitinfo/graphics.py +++ b/xbitinfo/graphics.py @@ -233,6 +233,7 @@ def plot_bitinformation(bitinfo, cmap="turku", crop=None): """ import matplotlib.pyplot as plt + bitinfo = bitinfo.squeeze() assert ( "dim" not in bitinfo.dims ), "Found dependence of bitinformation on dimension. Please reduce data first by e.g. `bitinfo.max(dim='dim')`"