Commit cb72f7d6 authored by Kris Vanneste's avatar Kris Vanneste
Browse files

Catch error with hillshading if grid data is not a masked array in...

Catch error with hillshading if grid data is not a masked array in draw_grid_layer method of LayeredBasemap.

git-svn-id: https://svn.seismo.oma.be/svn/seismo/mapping/layeredbasemap/trunk@6935 40b490c5-b4d9-47cb-8714-9bef99b524d5
parent 0a6c758b
......@@ -1204,7 +1204,8 @@ class LayeredBasemap:
hillshade_style = grid_style.hillshade_style
if hillshade_style:
## Copy grid_data mask, as it seems to disappear when it is accessed...
hillshade_mask = np.copy(grid_data.values.mask)
if isinstance(grid_data.values, np.ma.core.MaskedArray):
hillshade_mask = np.copy(grid_data.values.mask)
azimuth = hillshade_style.azimuth
elevation_angle = hillshade_style.elevation_angle
scale = hillshade_style.scale
......
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