def determine_axes(f, *vars):
    """
    Determine the axes along which the FT should be performed.
    """
    if len(vars) != len(f.shape):
        raise TypeError('The number of variables has to match the dimension of '
                        '`f`. Use `None` for axis with respect to which no '
                        'transform should be performed.')

    return [i for i, var in enumerate(vars) if var is not None]