You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the output for the straightforward loop-based implementation is different from the correlation-based versions. In the static version of the notebook, the input is:
Note that the difference is on the boundaries, and that's because the following line doesn't work for the boundaries:
neighbors=a[i-1:i+2, j-1:j+2]
A student in my class made this observation, and also supplied an alternative version that explicitly checks for boundaries. I have confirmed that this version produces the same output as the cross correlation version.
This is a good catch, and thanks to your student for the updated code.
I am inclined to leave this issue along for now, but I will leave it open in case other readers are bothered.
Note that the output for the straightforward loop-based implementation is different from the correlation-based versions. In the static version of the notebook, the input is:
The output for the loop-based implementation is:
The output for the cross correlation version is:
Note that the difference is on the boundaries, and that's because the following line doesn't work for the boundaries:
A student in my class made this observation, and also supplied an alternative version that explicitly checks for boundaries. I have confirmed that this version produces the same output as the cross correlation version.
The text was updated successfully, but these errors were encountered: