-
Notifications
You must be signed in to change notification settings - Fork 528
Closed
Labels
Description
Hi,
There is a (subtle) bug in EMD_1d: the indices i and j are allowed to reach n and m, therefore these lines have unkown behaviour (the resulting values w_i and w_j are dereferenced from the next memory slot in the machine, therefore it could be any value or even fail depending on compiler).
An easy fix would be to change the while condition to a while True and add break condiditions within the if-else branches.
Line 191 in 0a1e8cd
w_i = u_weights[i] |
Line 199 in 0a1e8cd
w_j = v_weights[j] |
I'll send a pull request if you are happy with this alternative