Skip to content

Commit

Permalink
mnt: remove some numpy biolerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Aug 2, 2024
1 parent e38e7f8 commit b7bbcde
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 b7bbcde

Please sign in to comment.