Then revert it back to np.zeros and remove the explicit assignment of corner_response[i, j] = 0, the speed gain was minimal anyway.