Skip to content

Add slc option to Chain.get_draws and get_stats #49

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

Merged
merged 1 commit into from
Aug 14, 2022

Conversation

michaelosthege
Copy link
Member

@michaelosthege michaelosthege commented Aug 13, 2022

This PR adds a slc kwarg to the method signatures.
In a follow-up PR the implementations---particularly the ClickHouseChain._get_rows method---can be updated to make use of the slc information to select the data more efficiently (#50).

I added tests that assert that the slc functions in the same way as NumPy slicing the result manually.

Closes #47

@codecov-commenter
Copy link

Codecov Report

Merging #49 (bb42d58) into main (183407d) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #49   +/-   ##
=======================================
  Coverage   95.80%   95.80%           
=======================================
  Files           8        8           
  Lines         572      572           
=======================================
  Hits          548      548           
  Misses         24       24           
Impacted Files Coverage Δ
mcbackend/__init__.py 71.42% <100.00%> (ø)
mcbackend/backends/clickhouse.py 100.00% <100.00%> (ø)
mcbackend/backends/numpy.py 100.00% <100.00%> (ø)
mcbackend/core.py 87.30% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@michaelosthege michaelosthege merged commit 1b2fe3b into main Aug 14, 2022
@michaelosthege michaelosthege deleted the add-get-slicing branch August 14, 2022 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request schemas & signatures Data structures and behaviors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Chain.get_draws(..., *, start, stop, step) kwargs to slice draws/stats upon retrieval
2 participants