From d95907d8f6cde8d4782301400731f653c52b15ab Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Mon, 24 Oct 2016 14:14:15 +0100 Subject: [PATCH] Ignore empty slice warning when plotting Layout containing Empty --- holoviews/plotting/mpl/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/holoviews/plotting/mpl/util.py b/holoviews/plotting/mpl/util.py index 3212e0e8fd..c57e4a3e1b 100644 --- a/holoviews/plotting/mpl/util.py +++ b/holoviews/plotting/mpl/util.py @@ -53,11 +53,11 @@ def normalize_ratios(ratios): def compute_ratios(ratios, normalized=True): unpacked = unpack_adjoints(ratios) - if normalized: - unpacked = normalize_ratios(unpacked) - sorted_ratios = sorted(unpacked.items()) with warnings.catch_warnings(): warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered') + if normalized: + unpacked = normalize_ratios(unpacked) + sorted_ratios = sorted(unpacked.items()) return np.nanmax(np.vstack([v for _, v in sorted_ratios]), axis=0)