Commit 3346f312 authored by Daniel Scheffler's avatar Daniel Scheffler

Fixed GeoArray.show_histogram() (issue #17).

parent 05640d94
......@@ -1333,10 +1333,10 @@ class GeoArray(object):
"""
if self.nodata is not None and exclude_nodata:
data = np.ma.masked_equal(self[band], self.nodata)
data = np.ma.masked_equal(self[band] if not self.bands == 1 else self[:], self.nodata)
data = data.compressed()
else:
data = self[band]
data = self[band] if not self.bands == 1 else self[:]
vmin = vmin if vmin is not None else np.nanpercentile(data, 1)
vmax = vmax if vmax is not None else np.nanpercentile(data, 99)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment