<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mapzen_elevation_rgb(arr):
 """ Encode elevation value to RGB values compatible with Mapzen tangram. Attributes arr : numpy ndarray Image array to encode. Returns ------- out : numpy ndarray RGB array (3, h, w) """

    arr = np.clip(arr + 32768.0, 0.0, 65535.0)
    r = arr / 256
    g = arr % 256
    b = (arr * 256) % 256
    return np.stack([r, g, b]).astype(np.uint8)