def _check_input_size(n_components, n_features):
    if n_components <= 0:
        raise ValueError("n_components must be strictly positive, got %d" %
                         n_components)
    if n_features <= 0:
        raise ValueError("n_features must be strictly positive, got %d" %
                         n_components)
Factorize argument checking for random matrix generation
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/random_projection.py/_check_input_size