Skip to content
This repository was archived by the owner on Mar 6, 2021. It is now read-only.
This repository was archived by the owner on Mar 6, 2021. It is now read-only.

Missing function atleast2d_or_csr() - scikit-learn 0.17.0  #3

Open

Description

@srimalj

Hi

Thanks for the code.

The function atleast2d_or_csr() used in random_layer.py does not seem to be available any more with the new scikit-learn 0.17.0

I managed to work around this temporarily by defining a function by that name which simply returns the matrix without performing any checks.

def atleast2d_or_csr(X):
return X

I'm not sure what checks should be in there or what the equivalent function in the new scikit is though.

Hope this helps

Cheers

Srimal.

Activity

  1. StevenLOL commented on Jul 26, 2016

    @StevenLOL

    From its name , I think it is checking whether the input is at least 2d or a csr matrix .

  2. stgrmks commented on Nov 4, 2016

    @stgrmks
  3. markuskreitzer commented on Apr 12, 2017

    @markuskreitzer

    I fixed this by replacing it with check_array which does the same thing. Trying to figure out how to push this change back to you, but I'm not sure how.

  4. PavithranRick commented on Oct 16, 2017

    @PavithranRick

    Go to the file random_layer.py

    Change the line no 27 as "from sklearn.utils import check_random_state, check_array"
    Line numbers 111 and 133 as "X = check_array(X)"

    This should work fine

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions