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

Fix convolution spec and outputs in README.md #36

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BrandonConder
Copy link

Closes #35

Updated the conv_spec function in the .py and .ipynb files. Updated README.md to match the changes.

This version of conv_spec was confirmed with the test case inputs against numpy.convolution(a, b, mode='same') and cupy.convolution(a, b, mode='same'). All 3 calculations are in agreement for both test cases.

The spec change doesn't make the problem particularly harder. The solution would require substituting i - j + 1 in place of i + j and adding a check for i - j + 1 > size.

Due to the added check, it may be worth updating the conv_test text from # FILL ME IN (roughly 17 lines) to # FILL ME IN (roughly 18 lines), however it's only a rough number of lines regardless.

@BrandonConder
Copy link
Author

Whoops, sorry, this isn't ready yet. I just realized that the "+1" isn't an indexing nuance, it's actually a function of the size of "b" being so small. I'll run some more test cases.

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.

Puzzle 11: conv_spec does not implement convolution
1 participant