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

Faster WeightedSampler implementation #308

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

dvolgyes
Copy link
Contributor

Np.sortedsearch performs binary search, which is logN steps, instead of
the arithmetics on the full array and then a linear search (argmax).

@dvolgyes
Copy link
Contributor Author

I meant np.searchsorted.

@codecov
Copy link

codecov bot commented Sep 18, 2020

Codecov Report

Merging #308 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #308   +/-   ##
=======================================
  Coverage   92.89%   92.89%           
=======================================
  Files         109      109           
  Lines        5070     5070           
=======================================
  Hits         4710     4710           
  Misses        360      360           
Impacted Files Coverage Δ
torchio/data/sampler/weighted.py 90.10% <100.00%> (ø)

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 ba751d9...acd2b08. Read the comment docs.

@fepegar
Copy link
Owner

fepegar commented Sep 21, 2020

I was about to check this PR. Did you just push to the wrong branch?

@dvolgyes
Copy link
Contributor Author

Yes, but hopefully i undid it.

@fepegar fepegar merged commit 2a02f12 into fepegar:master Sep 21, 2020
@fepegar
Copy link
Owner

fepegar commented Sep 21, 2020

Added in v0.17.40. Thanks, @dvolgyes!

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.

None yet

2 participants