Skip to content

Commit

Permalink
0.0 resolves to False in this Python gotcha, compare to None. Fixes s…
Browse files Browse the repository at this point in the history
…grid#50.

Former-commit-id: 688a32a
  • Loading branch information
kwilcox committed Jul 10, 2015
1 parent b258eef commit 3fbd1eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wms/mpl_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3fbd1eb

Please sign in to comment.