added assert, as suggested by @behdad in #749
This commit is contained in:
parent
6775add8b0
commit
289fd62d8f
@ -44,6 +44,7 @@ def normalizeLocation(location, axes):
|
||||
"""
|
||||
out = {}
|
||||
for tag,(lower,default,upper) in axes.items():
|
||||
assert lower <= default <= upper, "invalid axis values"
|
||||
v = location.get(tag, default)
|
||||
v = max(min(v, upper), lower)
|
||||
if v == default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user