def check_response_dimensionality(train, test, allow_test_none=True):
    """Make sure matrices are 2D arrays before running models
    """
    if train.ndim == 1:
        train = train[..., None]
    if test is not None:
        if test.ndim == 1:
            test = test[..., None]
    elif not allow_test_none:
        test = train
    return train, test
