Fix a bug occurring when n_samples in a class < n_features
Fix case n_sample in a class == 1