def hstack(datasets):
    if np.any([sparse.issparse(d) for d in datasets]):
        stack = lambda x: sparse.hstack(x).tocsr()
    else:
        stack = np.hstack
    return stack(datasets)
A Helpful decorator which can switch the flag values temporarily.
dataset/ETHPy150Open theusual/kaggle-seeclickfix-ensemble/Miroslaw/data_transforms.py/hstack--crossover with--dataset/ETHPy150Open google/grr/grr/lib/flags.py/FlagOverrider