Commit 0a311956 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Merge branch 'bugfix/fix_show' into 'master'

Fix GeoArray.show().

See merge request !19
parents 317f2918 36ae086e
Pipeline #18613 passed with stages
in 25 minutes and 37 seconds
......@@ -2,6 +2,12 @@
History
=======
0.10.8 (2021-01-28)
-------------------
* Fixed an issue in GeoArray.show() that caused an invisible plot for some input images.
0.10.7 (2021-01-27)
-------------------
......
......@@ -1214,7 +1214,7 @@ class GeoArray(object):
res_factor=res_factor, nodataVal=nodataVal, ignore_rotation=ignore_rotation)
palette, vmin, vmax = self._get_cmap_vmin_vmax(cmap, vmin, vmax, pmin, pmax, image2plot, nodataVal)
if nodataVal is not None and np.std(image2plot) != 0:
if nodataVal is not None and np.std(image2plot.astype(np.float)) != 0:
image2plot = np.ma.masked_equal(image2plot, nodataVal)
# check availability of holoviews
......@@ -1256,7 +1256,7 @@ class GeoArray(object):
ax = plt.gca()
rows, cols = image2plot.shape[:2]
im = ax.imshow(image2plot,
im = ax.imshow(image2plot.astype(np.int),
palette,
interpolation=interpolation,
extent=(0, cols, rows, 0),
......
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