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

Out of range index error #11

Closed
hodjat91 opened this issue Jul 1, 2020 · 1 comment
Closed

Out of range index error #11

hodjat91 opened this issue Jul 1, 2020 · 1 comment

Comments

@hodjat91
Copy link
Collaborator

hodjat91 commented Jul 1, 2020

Hi,

I think there is an "out of range IndexError" in the "bin_array" class inside coverage.py file: line 278:
self.nbins = -1 if len(nbins) == 0 else nbins[1]

I believe it should be nbins[0]. Please correct me if I'm missing something here.

Thanks

@mballance
Copy link
Member

mballance commented Jul 2, 2020

Good catch, Hodjat! You're correct about the index being incorrect. I've added a test to show the error, as well as a fix (2f6a5bd).
By the way, I'm very much open to PRs -- whether for something obvious like this or something more complex.

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