mnnpy
mnnpy copied to clipboard
Taking len of `None` when passing matrices instead of anndata
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()
I found this bug too.