def filtername(f):
    """Return the name of a filter given its number.

    Parameters
    ----------
    f : :class:`int`
        The filter number.

    Returns
    -------
    :class:`str`
        The corresponding filter name.

    Examples
    --------
    >>> filtername(0)
    'u'
    """
    if isinstance(f, (str,)):
        return f
    fname = ('u', 'g', 'r', 'i', 'z')
    return fname[f]