Forward the learn argument from xqrs_detect to XQRS.detect#569
Open
arpitjain099 wants to merge 1 commit into
Open
Forward the learn argument from xqrs_detect to XQRS.detect#569arpitjain099 wants to merge 1 commit into
arpitjain099 wants to merge 1 commit into
Conversation
xqrs_detect accepts a learn parameter and documents it, but the call to XQRS.detect never passed it on, so learn=False was silently ignored and learning always ran. Pass learn=learn through to the detector and add a regression test that asserts the argument is forwarded. Closes MIT-LCP#473 Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xqrs_detect()inwfdb/processing/qrs.pytakes (and documents) alearnboolean, but the wrapper never passed it through toXQRS.detect():So
learnwas silently dropped and learning always ran, even when a caller setlearn=False. The one-line fix forwards it:I also added a regression test (
TestXQRSDetect.test_xqrs_detect_forwards_learn) that patchesXQRS.detectand asserts thelearnargument actually reaches it. The test fails against the old code (thelearnkwarg is missing) and passes with the fix. I put it in aTest-prefixed class so pytest collects it (the existingtest_qrsclass name is not picked up by default collection).Closes #473