Skip to content

Commit a3e43e6

Browse files
Huitedcherian
authored andcommitted
Avoid multiplication DeprecationWarning in rasterio backend (#3428)
1 parent e258b88 commit a3e43e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xarray/backends/rasterio_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ def open_rasterio(filename, parse_coordinates=None, chunks=None, cache=None, loc
257257
if parse:
258258
nx, ny = riods.width, riods.height
259259
# xarray coordinates are pixel centered
260-
x, _ = (np.arange(nx) + 0.5, np.zeros(nx) + 0.5) * riods.transform
261-
_, y = (np.zeros(ny) + 0.5, np.arange(ny) + 0.5) * riods.transform
260+
x, _ = riods.transform * (np.arange(nx) + 0.5, np.zeros(nx) + 0.5)
261+
_, y = riods.transform * (np.zeros(ny) + 0.5, np.arange(ny) + 0.5)
262262
coords["y"] = y
263263
coords["x"] = x
264264
else:

0 commit comments

Comments
 (0)