def blank_layers(input_array, n_layers=2, blank=1):
    """Return a copy of the input array with the top and bottom
    n_layers set to a particular value."""

    _, _, zdim = input_array.shape

    start_z = n_layers
    stop_z = zdim - n_layers

    blanked = input_array.copy()

    blanked[:,:,0:start_z] = blank
    blanked[:,:,stop_z:] = blank

    return blanked