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

IndexError: index XX is out of bounds for axis 0 with size XX of scLVM/core.py #16

Closed
Japrin opened this issue Jul 27, 2016 · 1 comment

Comments

@Japrin
Copy link

Japrin commented Jul 27, 2016

Hi,

the code around 204 line of scLVM/core.py :

if not _conv:
        var[count,-2] = SP.maximum(0,y.var()-tech_noise[ids])
        var[count,-1] = tech_noise[ids]
        count+=1;
        if self.geneID is not None: geneID[count] = self.geneID[ids]
        continue

I think count+=1; should be put after if self.geneID is not None: geneID[count] = self.geneID[ids]. Otherwise when I call the function varianceDecomposition() with i0 and i1 setting as, for example, 100 and 150, the out of bounds error occur frequently if ids reach i1.
Also I don't know why do the assignment geneID[count] = self.geneID[ids] only when _conv is False, rather than assigning the geneID for every ids.

Thanks!

@flophys
Copy link
Member

flophys commented Sep 6, 2016

good catch, thank you. fixed.

@flophys flophys closed this as completed Sep 6, 2016
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