def hillshade(elevation, tile, azimuth=<NUM_LIT>, altitude=<NUM_LIT>, z=<NUM_LIT:1.0>, scale=<NUM_LIT:1.0>):
azimuth = float(azimuth)<EOL>altitude = float(altitude)<EOL>z = float(z)<EOL>scale = float(scale)<EOL>xres = tile.tile.pixel_x_size<EOL>yres = -tile.tile.pixel_y_size<EOL>slope, aspect = calculate_slope_aspect(<EOL>elevation, xres, yres, z=z, scale=scale)<EOL>deg2rad = math.pi / <NUM_LIT><EOL>shaded = np.sin(altitude * deg2rad) * np.sin(slope)+ np.cos(altitude * deg2rad) * np.cos(slope)* np.cos((azimuth - <NUM_LIT>) * deg2rad - aspect)<EOL>shaded = (((shaded+<NUM_LIT:1.0>)/<NUM_LIT:2>)*-<NUM_LIT>).astype("<STR_LIT>")<EOL>return ma.masked_array(<EOL>data=np.pad(shaded, <NUM_LIT:1>, mode='<STR_LIT>'), mask=elevation.mask<EOL>)<EOL>
Return hillshaded numpy array.

Parameters
----------
elevation : array
    input elevation data
tile : Tile
    tile covering the array
z : float
    vertical exaggeration factor
scale : float
    scale factor of pixel size units versus height units (insert 112000
    when having elevation values in meters in a geodetic projection)