def swap_columns(a, b, array):
    """
    Function that swaps columns of a given matrix
    :param a: int
    :param b: int
    :param array: numpy array
    :return: array_swapped: numpy array with the columns swapped
    """
    array_swapped = array.copy()
    array_swapped[:, a] = array[:, b]
    array_swapped[:, b] = array[:, a]
    return array_swapped