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
Shouldn't it be: np.diff(np.signbit(np.diff( here? I.e., counting the changes in sign of the consecutive differences, rather than the difference of the sign of the consecutive samples 🤔
The text was updated successfully, but these errors were encountered:
You mean using np.diff(np.signbit(x), n=2).sum() instead of np.diff(np.signbit(x)).sum(), correct?
Taking a sine wave example, I think that the current method implemented in AntroPy is correct:
importnumpyasnpimportmatplotlib.pyplotaspltsf, f, dur=100, 1, 4N=sf*dur# Total number of discrete samplest=np.arange(N) /sf# Time vectorx=np.sin(2*np.pi*f*t)
plt.plot(t, x)
plt.xlim(t[0], t[-1])
plt.axhline(0);
Hi Raph,
Was doing some cross-checking and I have a quick question to disperse a doubt in my mind regarding the counting of the number of inversions:
antropy/antropy/entropy.py
Line 908 in 88fea89
Shouldn't it be:
np.diff(np.signbit(np.diff(
here? I.e., counting the changes in sign of the consecutive differences, rather than the difference of the sign of the consecutive samples 🤔The text was updated successfully, but these errors were encountered: