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

Stop "RuntimeWarning: invalid value encountered in true_divide" #297

Closed

Conversation

hyanwong
Copy link
Member

I was getting a little annoyed by "invalid value encountered in true_divide" warnings during the unit tests in some of the TestDiversity derived classes. This stops the errors, but perhaps we want to work out why they are happing in the first place. I guess this is a @petrelharp thing?

@petrelharp
Copy link
Contributor

Hm, that shouldn't actually change anything because of this. I'm surprised you get these; I thought we'd taken care of them? I can't track this down right now, apologies.

@hyanwong
Copy link
Member Author

Weird. FWIW - example in a recent CircleCI run:

https://circleci.com/gh/tskit-dev/tskit/734 under "Run Python tests"

test_empty_ts (tests.test_tree_stats.TestBranchDiversity) ... /home/circleci/tskit/python/tests/test_tree_stats.py:1188: RuntimeWarning: invalid value encountered in true_divide
  return x * (n - x) / (n * (n - 1))
ok

@hyanwong
Copy link
Member Author

No hurry on this, obv. Just scratching an itch.

@petrelharp
Copy link
Contributor

I have fixed this over here.

@petrelharp petrelharp mentioned this pull request Aug 23, 2019
@jeromekelleher
Copy link
Member

Issue closed in #330.

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

Successfully merging this pull request may close these issues.

3 participants