Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandas version of as_matrix is deprecated #24

Open
RRCinci-Lu opened this issue Mar 29, 2020 · 4 comments
Open

Pandas version of as_matrix is deprecated #24

RRCinci-Lu opened this issue Mar 29, 2020 · 4 comments

Comments

@RRCinci-Lu
Copy link

I was trying to use pandas version 1.0.0 with grnboost2. However, I ran into a problem where the as_matrix call part of grnboost2 does not work because it is deprecated (I think people use .values instead). Do you know a way to use the older version of pandas so I do not run into this problem?

Thanks, I am somewhat new to programming.

rcannood referenced this issue in dynverse/dyngen_manuscript Apr 21, 2020
…accept data frames anymore, related to tmoerman/arboreto#24)
@rcannood
Copy link

rcannood commented Apr 21, 2020

You can try to pass your object as a matrix rather than a data frame.

Alternatively, you can force an older version of pandas with pip install --user "pandas<1.0"

@diegoalexespi
Copy link

I've been able to get around this by locally going into algo.py and changing line 214 from expression_matrix = expression_data.as_matrix() to expression_matrix = eexpression_data.as_numpy()

@deto
Copy link

deto commented Jun 9, 2020

@d93espinoza did you mean to_numpy instead of as_numpy?

@f6v
Copy link

f6v commented Sep 15, 2020

The way to run it is:

network = grnboost2(expression_data=ex_matrix.to_numpy(), tf_names=tf_names, gene_names=ex_matrix.columns)

gene_names is required in case you pass a matrix as the input to the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants