File tree 1 file changed +8
-7
lines changed 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -237,13 +237,14 @@ def gray_from_float_rgba():
237
237
def test_light_source_topo_surface ():
238
238
"""Shades a DEM using different v.e.'s and blend modes."""
239
239
fname = cbook .get_sample_data ('jacksboro_fault_dem.npz' , asfileobj = False )
240
- with np .load (fname ) as dem :
241
- elev = dem ['elevation' ]
242
- # Get the true cellsize in meters for accurate vertical exaggeration
243
- # Convert from decimal degrees to meters
244
- dx , dy = dem ['dx' ], dem ['dy' ]
245
- dx = 111320.0 * dx * np .cos (dem ['ymin' ])
246
- dy = 111320.0 * dy
240
+ dem = np .load (fname )
241
+ elev = dem ['elevation' ]
242
+ # Get the true cellsize in meters for accurate vertical exaggeration
243
+ # Convert from decimal degrees to meters
244
+ dx , dy = dem ['dx' ], dem ['dy' ]
245
+ dx = 111320.0 * dx * np .cos (dem ['ymin' ])
246
+ dy = 111320.0 * dy
247
+ dem .close ()
247
248
248
249
ls = mcolors .LightSource (315 , 45 )
249
250
cmap = cm .gist_earth
You can’t perform that action at this time.
0 commit comments