Skip to content

Commit

Permalink
BUG: ensure band_key is list when iterating over bands for mask and s…
Browse files Browse the repository at this point in the history
…cale (#87)
  • Loading branch information
snowman2 authored Feb 3, 2020
1 parent 3c361b8 commit 94ede70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/history.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
History
=======

0.0.20
------
- BUG: ensure band_key is list when iterating over bands for mask and scale (pull #87)

0.0.19
-------
- Add support for writing scales & offsets to raster (pull #79)
Expand Down
2 changes: 1 addition & 1 deletion rioxarray/_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _getitem(self, key):
if self.masked:
out = np.ma.filled(out.astype(self.dtype), np.nan)
if self.mask_and_scale:
for band in band_key:
for band in np.atleast_1d(band_key):
band_iii = band - 1
out[band_iii] = (
out[band_iii] * riods.scales[band_iii]
Expand Down

0 comments on commit 94ede70

Please sign in to comment.