Closed mestia closed 7 years ago
Aha, it seems that np.float is the Python built-in float, which should be, but not always seems to be (depending on the C compiler used) a 64bit float. My guess is that the Python float in the i386 build machine is actually 32bit. Could you please try https://github.com/FCS-analysis/multipletau/commit/4a74137f9d9090571893388937b31188d9973132?
the commit fixes the AttributeError but tests still fail with AssertionError. You still can see it here 860624
=================================== FAILURES ===================================
____ test_ac_simple ____
def test_ac_simple():
myframe = sys._getframe()
myname = myframe.f_code.co_name
print("running ", myname)
arrs = get_sample_arrays()
res = []
for a in arrs:
r = multipletau.autocorrelate(a=a,
m=16,
deltat=1,
normalize=False,
copy=True,
dtype=np.float_)
res.append(r)
res = np.concatenate(res)
#np.save(os.path.dirname(__file__)+"/data/"+os.path.basename(__file__)+"_"+myname+".npy", res)
ref = get_reference_data(myname, __file__)
assert np.all(res==ref)
E assert False
E + where False = <function all at 0xb612d79c>(array([[ 0.0...4640390e+21]]) == array([[ 0.00...4640390e+21]]) E + where <function all at 0xb612d79c> = np.all
E Use -v to get the full diff)
tests/test_autocorrelate.py:65: AssertionError
Any idea how to fix that ?
The link you sent (860624) is the old build. I could allow these tests to fail on i386. I thought it had to do with floating point precision, but the problem seems to lie somewhere else. Python should always use np.float64 for np.float_. Are the tests run on a standard debian image that I could run in a VM and play around with?
Build fails on a standart Debian Stretch - current testing. If only tests are broken and it is complicated to fix them then I guess I can exclude the tests on i386 and propose that as the temporary workaround.
Ok, I will have a look an let you know when I have a clear picture of the problem. I could also create rules for i386 Python, so you probably won't have to implement any workaround.
It now works for me. I will release version 0.1.7, if it works for you.
The problem was that floating point operations are not always implemented the same way, e.g.:
Thanks, yes, please release it. What are the major changes, the tests ?
Yes, the major changes are the tests. The minor change is that multipletau now always uses numpy dtypes by default, which I feel better about, but which should not affect any use case.
Thanks for fixing the problem.
Hi, in Debian python-multipletau fails on i386 Debian bug 860624 Could you please have a look ?