diff --git a/src/pyiem/iemre.py b/src/pyiem/iemre.py index f0c0dc8f..c508f1e3 100644 --- a/src/pyiem/iemre.py +++ b/src/pyiem/iemre.py @@ -213,8 +213,8 @@ def find_ij(lon, lat): if lon < WEST or lon >= EAST or lat < SOUTH or lat >= NORTH: return None, None - i = np.digitize([lon], XAXIS)[0] - 1 - j = np.digitize([lat], YAXIS)[0] - 1 + i = np.digitize(lon, XAXIS) - 1 + j = np.digitize(lat, YAXIS) - 1 return i, j diff --git a/src/pyiem/prism.py b/src/pyiem/prism.py index 591e7ecc..df297dee 100644 --- a/src/pyiem/prism.py +++ b/src/pyiem/prism.py @@ -31,7 +31,7 @@ def find_ij(lon, lat): if lon < WEST or lon >= EAST or lat < SOUTH or lat >= NORTH: return None, None - i = np.digitize([lon], XAXIS)[0] - 1 - j = np.digitize([lat], YAXIS)[0] - 1 + i = np.digitize(lon, XAXIS) - 1 + j = np.digitize(lat, YAXIS) - 1 return i, j