Skip to content

Commit

Permalink
Merge pull request #943 from akrherz/mnt
Browse files Browse the repository at this point in the history
mnt: remove some numpy biolerplate
  • Loading branch information
akrherz authored Aug 2, 2024
2 parents e38e7f8 + b7bbcde commit 1d832e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pyiem/iemre.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/pyiem/prism.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1d832e7

Please sign in to comment.