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

fixed #827 by limiting width to at most the length of the data in rec… #833

Merged
merged 1 commit into from Feb 22, 2019

Conversation

bmcfee
Copy link
Member

@bmcfee bmcfee commented Feb 22, 2019

Reference Issue

#827

What does this implement/fix? Explain your changes.

This PR adds an upper bound check on the width parameter of segment.recurrence_matrix.

Left unchecked, a width > data.shape[axis] results in an opaque error when we call setdiag on the sparse neighbor graph. There's no reason to allow width to exceed the duration anyway (this will always produce an all-zeros matrix).

Any other comments?

There's functionally no change here, but the exception that gets raised in this scenario is more user-friendly and should be easier to debug with. Assuming it passes CI, I see no need for CR.


This change is Reviewable

@bmcfee bmcfee added bug Something doesn't work like it should enhancement Does this improve existing functionality? labels Feb 22, 2019
@bmcfee bmcfee self-assigned this Feb 22, 2019
@bmcfee bmcfee added this to the 0.7.0 milestone Feb 22, 2019
Copy link
Member Author

@bmcfee bmcfee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@bmcfee bmcfee merged commit 29e51cb into master Feb 22, 2019
@bmcfee bmcfee deleted the recurrence-docs branch February 22, 2019 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something doesn't work like it should enhancement Does this improve existing functionality?
Development

Successfully merging this pull request may close these issues.

None yet

1 participant