File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -471,14 +471,14 @@ def _degrees_to_index(degrees, coordinate):
471471 inputmax = 180
472472 outputmax = 4320
473473 else :
474- raise IndexError ("coordinate must be 'latitude' or 'longitude'." )
474+ raise ValueError ("coordinate must be 'latitude' or 'longitude'." )
475475
476476 inputrange = inputmax - inputmin
477477 scale = outputmax / inputrange # number of indices per degree
478478 center = inputmin + 1 / scale / 2 # shift to center of index
479479 outputmax -= 1 # shift index to zero indexing
480480 index = (degrees - center ) * scale
481- err = IndexError ('Input, %g, is out of range (%g, %g).' %
481+ err = ValueError ('Input, %g, is out of range (%g, %g).' %
482482 (degrees , inputmin , inputmax ))
483483
484484 # If the index is still out of bounds after rounding, raise an error.
You can’t perform that action at this time.
0 commit comments