diff --git a/source/pacmap/pacmap.py b/source/pacmap/pacmap.py index 02b504c..bb4219f 100644 --- a/source/pacmap/pacmap.py +++ b/source/pacmap/pacmap.py @@ -869,9 +869,12 @@ def __init__(self, self.random_state = 0 _RANDOM_STATE = None # Reset random state - if self.n_components < 2: + if self.n_components < 1: raise ValueError( - "The number of projection dimensions must be at least 2.") + "The number of projection dimensions must be at least 1." + ) + if self.n_components != 2: + logger.warning("Note: `n_components != 2` have not been thoroughly tested.") if self.lr <= 0: raise ValueError("The learning rate must be larger than 0.") if self.distance == "hamming" and apply_pca: