From #8351. My proposed solution is to disallow `1.`. We have `None` for "select all components", so we don't actually need `1.`.
Activity
larsoner commentedon Oct 8, 2020
cc @hoechenberger @cbrnr
agramfort commentedon Oct 8, 2020
hoechenberger commentedon Oct 8, 2020
+1 to disallow, depending on how we handle the 1 int case?? ;)
hoechenberger commentedon Oct 8, 2020
To be more precise, I think we should disallow 1 as int, and allow 1.0 as float.
If we decide to keep allowing 1 as int, 1.0 float should not be allowed.
larsoner commentedon Oct 8, 2020
I don't think we should allow
1.(float), I'm okay with1as an int -- maybe there is some use case for itlarsoner commentedon Oct 8, 2020
Okay let's just disallow both. ICA is a no-op when you set
n_components=1so it doesn't really make senseagramfort commentedon Oct 8, 2020
cbrnr commentedon Oct 8, 2020
Yes, let's either disallow both or allow both (and then both 1 and 1.0 refer to all components because one component doesn't make sense).
hoechenberger commentedon Oct 8, 2020
Uh please don't allow both then, for the sake of API consistency
cbrnr commentedon Oct 8, 2020
I'm fine with disallowing both, but IMO
1 == 1.0is consistent.