Skip to content

Commit

Permalink
Avoid multiplication DeprecationWarning in rasterio backend (#3428)
Browse files Browse the repository at this point in the history
  • Loading branch information
Huite authored and dcherian committed Oct 22, 2019
1 parent e258b88 commit a3e43e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xarray/backends/rasterio_.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ def open_rasterio(filename, parse_coordinates=None, chunks=None, cache=None, loc
if parse:
nx, ny = riods.width, riods.height
# xarray coordinates are pixel centered
x, _ = (np.arange(nx) + 0.5, np.zeros(nx) + 0.5) * riods.transform
_, y = (np.zeros(ny) + 0.5, np.arange(ny) + 0.5) * riods.transform
x, _ = riods.transform * (np.arange(nx) + 0.5, np.zeros(nx) + 0.5)
_, y = riods.transform * (np.zeros(ny) + 0.5, np.arange(ny) + 0.5)
coords["y"] = y
coords["x"] = x
else:
Expand Down

0 comments on commit a3e43e6

Please sign in to comment.