def corners(arr):
    """ Modify a 2-D array to all zeros and then set the corners to 1 """
    arr[:] = 0.0
    arr[0, 0] = 1.0
    arr[-1, 0] = 1.0
    arr[-1, -1] = 1.0
    arr[0, -1] = 1.0
    return arr