From 3fbd1eb1567210f2273c18241648d0d1596dc06d Mon Sep 17 00:00:00 2001 From: Kyle Wilcox Date: Fri, 10 Jul 2015 10:29:31 -0400 Subject: [PATCH] 0.0 resolves to False in this Python gotcha, compare to None. Fixes #50. Former-commit-id: 688a32a4908b786670a2c8580aa76ebfe9fb4822 --- wms/mpl_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wms/mpl_handler.py b/wms/mpl_handler.py index 2691bda..f2c6665 100644 --- a/wms/mpl_handler.py +++ b/wms/mpl_handler.py @@ -113,7 +113,7 @@ def quiver_response(lon, # Set to black like ncWMS? # Configurable by user? norm = None - if cmin and cmax: + if cmin is not None and cmax is not None: mags[mags > cmax] = cmax mags[mags < cmin] = cmin bounds = np.linspace(cmin, cmax, 15)