Skip to content

Commit

Permalink
Replace read_band with read
Browse files Browse the repository at this point in the history
  • Loading branch information
mdbartos committed Feb 26, 2022
1 parent 959c792 commit f1412e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pysheds/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def read_raster(data, band=1, window=None, window_crs=None, mask_geometry=False,
if window is None:
shape = f.shape
if len(f.indexes) > 1:
data = np.ma.filled(f.read_band(band))
data = np.ma.filled(f.read(band))
else:
data = np.ma.filled(f.read())
affine = f.transform
Expand All @@ -121,7 +121,7 @@ def read_raster(data, band=1, window=None, window_crs=None, mask_geometry=False,
# If window crs not specified, assume it is in raster crs
ix_window = f.window(*window)
if len(f.indexes) > 1:
data = np.ma.filled(f.read_band(band, window=ix_window))
data = np.ma.filled(f.read(band, window=ix_window))
else:
data = np.ma.filled(f.read(window=ix_window))
affine = f.window_transform(ix_window)
Expand Down

0 comments on commit f1412e6

Please sign in to comment.