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

Taking len of None when passing matrices instead of anndata #38

Open
scottgigante opened this issue Jun 26, 2020 · 1 comment
Open

Taking len of None when passing matrices instead of anndata #38

scottgigante opened this issue Jun 26, 2020 · 1 comment

Comments

@scottgigante
Copy link

The default value of var_index is None, but the first thing you do with it if the data is not AnnData is take the len. https://github.com/chriscainx/mnnpy/blob/master/mnnpy/mnn.py#L148

>>> import numpy as np
>>> X = np.zeros((10, 100))
>>> Y = np.ones((10, 100))
>>> mnnpy.mnn_correct(X, Y)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Acer\AppData\Roaming\Python\Python37\site-packages\mnnpy\mnn.py", line 148, in mnn_correct
    if len(var_index) != n_cols:
TypeError: object of type 'NoneType' has no len()
@Kevis9
Copy link

Kevis9 commented Oct 29, 2022

I found this bug too.

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

2 participants