def filter_uniform(shape, n):
    """
    A dummy filter with one frequency band covering the whole domain. The
    weights are set to one.

    Parameters
    ----------
    shape: int or tuple
        The dimensions (height, width) of the input field. If shape is an int,
        the domain is assumed to have square shape.
    n: int
        Not used. Needed for compatibility with the filter interface.

    Returns
    -------
    out: dict
        A dictionary containing the filter.
    """
    del n  # Unused

    out = {}

    try:
        height, width = shape
    except TypeError:
        height, width = (shape, shape)

    r_max = int(max(width, height) / 2) + 1

    out["weights_1d"] = np.ones((1, r_max))
    out["weights_2d"] = np.ones((1, height, int(width / 2) + 1))
    out["central_freqs"] = None
    out["central_wavenumbers"] = None
    out["shape"] = shape

    return out
A dummy filter with one frequency band covering the whole domain. The
weights are set to one.

Parameters
----------
shape: int or tuple
The dimensions (height, width) of the input field. If shape is an int,
the domain is assumed to have square shape.
n: int
Not used. Needed for compatibility with the filter interface.

Returns
-------
out: dict
A dictionary containing the filter.
pysteps/cascade/bandpass_filters.py