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

Get r2_array returns new array. #397

Merged
merged 1 commit into from
Nov 11, 2019

Conversation

jeromekelleher
Copy link
Member

Currently the ld calculator get_r2_array method reuses the same memory between calls, leading to subtle bugs. Change this.

Closes #396

@jeromekelleher
Copy link
Member Author

This hasn't been fully tested yet, needs some more low-level checking for memory leaks.

@jeromekelleher
Copy link
Member Author

Note: might be simpler for now to just allocate a buffer for each call to get_r2_array, rather than messing with the C API. We're going to be replacing all of this at some point soon, hopefully, so not much point in messing with it.

@codecov
Copy link

codecov bot commented Nov 11, 2019

Codecov Report

Merging #397 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
- Coverage   86.53%   86.52%   -0.01%     
==========================================
  Files          20       20              
  Lines       14081    14072       -9     
  Branches     2748     2750       +2     
==========================================
- Hits        12185    12176       -9     
  Misses        977      977              
  Partials      919      919
Flag Coverage Δ
#c_tests 87.62% <100%> (-0.02%) ⬇️
#python_c_tests 90.38% <100%> (-0.02%) ⬇️
#python_tests 99.25% <100%> (-0.01%) ⬇️
Impacted Files Coverage Δ
python/tskit/stats.py 100% <100%> (ø) ⬆️
python/tskit/trees.py 98.7% <0%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e378504...e7b1a4e. Read the comment docs.

@jeromekelleher jeromekelleher merged commit 165c056 into tskit-dev:master Nov 11, 2019
@jeromekelleher jeromekelleher deleted the fix-ld-bug branch November 11, 2019 20:15
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.

LdCalculator pairwise differences
1 participant