Skip to content

BUG: 1. and 1 treated differently in ICA #8353

Closed

Description

@larsoner

From #8351.

My proposed solution is to disallow 1.. We have None for "select all components", so we don't actually need 1..

Activity

  1. larsoner commented on Oct 8, 2020

    @larsoner
    MemberAuthor
  2. agramfort commented on Oct 8, 2020

    @agramfort
    SponsorMember
  3. hoechenberger commented on Oct 8, 2020

    @hoechenberger
    Member

    +1 to disallow, depending on how we handle the 1 int case?? ;)

  4. hoechenberger commented on Oct 8, 2020

    @hoechenberger
    Member

    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.

  5. larsoner commented on Oct 8, 2020

    @larsoner
    MemberAuthor

    I don't think we should allow 1. (float), I'm okay with 1 as an int -- maybe there is some use case for it

  6. larsoner commented on Oct 8, 2020

    @larsoner
    MemberAuthor

    Okay let's just disallow both. ICA is a no-op when you set n_components=1 so it doesn't really make sense

  7. agramfort commented on Oct 8, 2020

    @agramfort
    SponsorMember
  8. cbrnr commented on Oct 8, 2020

    @cbrnr
    Contributor

    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).

  9. hoechenberger commented on Oct 8, 2020

    @hoechenberger
    Member

    Uh please don't allow both then, for the sake of API consistency

  10. cbrnr commented on Oct 8, 2020

    @cbrnr
    Contributor

    I'm fine with disallowing both, but IMO 1 == 1.0 is consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions