Skip to content

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.

@LIHUA919
Copy link

exactly

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

2 participants