From 6f76194e1fdd3a361b9aefd801045a564952c2fe Mon Sep 17 00:00:00 2001 From: Huite Date: Tue, 22 Oct 2019 10:30:22 +0200 Subject: [PATCH] Avoid multiplication DeprecationWarning in rasterio backend --- xarray/backends/rasterio_.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xarray/backends/rasterio_.py b/xarray/backends/rasterio_.py index 7430633c5c0..1f9b9943573 100644 --- a/xarray/backends/rasterio_.py +++ b/xarray/backends/rasterio_.py @@ -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: