Bug#863505: numba: AssertionError in TestTimedeltaArithmeticNoPython.test_mul and others [arm64]
Daniel Stender
debian at danielstender.com
Sat May 27 20:48:05 UTC 2017
Source: numba
Version: 0.33.0-1
Severity: serious
https://buildd.debian.org/status/fetch.php?pkg=numba&arch=arm64&ver=0.33.0-1&stamp=1495916190&raw=0
There are a couple of supposedly related test failures on arm64:
<cut>
___________________ TestTimedeltaArithmeticNoPython.test_mul ___________________
self = <numba.tests.test_npdatetime.TestTimedeltaArithmeticNoPython testMethod=test_mul>
def test_mul(self):
f = self.jit(mul_usecase)
def check(a, b, expected):
self.assertPreciseEqual(f(a, b), expected)
self.assertPreciseEqual(f(b, a), expected)
# non-int64 int * timedelta64
check(TD(3), np.uint32(2), TD(6))
# int * timedelta64
check(TD(3), 2, TD(6))
check(TD(3, 'ps'), 2, TD(6, 'ps'))
check(TD('NaT', 'ps'), 2, TD('NaT', 'ps'))
# float * timedelta64
check(TD(7), 1.5, TD(10))
check(TD(-7), 1.5, TD(-10))
check(TD(7, 'ps'), -1.5, TD(-10, 'ps'))
check(TD(-7), -1.5, TD(10))
check(TD('NaT', 'ps'), -1.5, TD('NaT', 'ps'))
> check(TD(7, 'ps'), float('nan'), TD('NaT', 'ps'))
numba/tests/test_npdatetime.py:328:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
numba/tests/test_npdatetime.py:313: in check
self.assertPreciseEqual(f(a, b), expected)
numba/tests/support.py:257: in assertPreciseEqual
self.fail("when comparing %s and %s: %s" % (first, second, failure_msg))
E AssertionError: when comparing 0 picoseconds and NaT: numpy.timedelta64(0,'ps') != numpy.timedelta64('NaT','ps')
</cut>
<cut>
_______________ TestLoopTypesDatetimeNoPython.test_multiply_dm_m _______________
self = <numba.tests.test_ufuncs.TestLoopTypesDatetimeNoPython testMethod=test_multiply_dm_m>
def test_template(self):
fn = _make_ufunc_usecase(ufunc)
> self._check_loop(fn, ufunc, loop)
numba/tests/test_ufuncs.py:1514:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
numba/tests/test_ufuncs.py:1471: in _check_loop
self._check_ufunc_with_dtypes(fn, ufunc, letter_types)
numba/tests/test_ufuncs.py:1500: in _check_ufunc_with_dtypes
ulps=ulps)
numba/tests/support.py:257: in assertPreciseEqual
self.fail("when comparing %s and %s: %s" % (first, second, failure_msg))
E AssertionError: when comparing [ -4 0 3 'NaT' 'NaT' 0 -7 'NaT'] and [ -4 0 3 'NaT' 'NaT' 0 -7 0]: numpy.timedelta64('NaT','D') != numpy.timedelta64(0,'D') : ufunc 'multiply' arrays differ ([array([ 1.5, 0. , 1.5, nan, -3.5, 0. , -3.5, nan]), array([ -3, 0, 2, 'NaT', 'NaT', -3, 2, 0], dtype='timedelta64[D]'), array([ -4, 0, 3, 'NaT', 'NaT', 0, -7, 0], dtype='timedelta64[D]')]):
E args: exact
E expected [ -4 0 3 'NaT' 'NaT' 0 -7 'NaT']
E got [ -4 0 3 'NaT' 'NaT' 0 -7 0]
</cut>
<cut>
_______________ TestLoopTypesDatetimeNoPython.test_multiply_md_m _______________
self = <numba.tests.test_ufuncs.TestLoopTypesDatetimeNoPython testMethod=test_multiply_md_m>
def test_template(self):
fn = _make_ufunc_usecase(ufunc)
> self._check_loop(fn, ufunc, loop)
numba/tests/test_ufuncs.py:1514:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
numba/tests/test_ufuncs.py:1471: in _check_loop
self._check_ufunc_with_dtypes(fn, ufunc, letter_types)
numba/tests/test_ufuncs.py:1500: in _check_ufunc_with_dtypes
ulps=ulps)
numba/tests/support.py:257: in assertPreciseEqual
self.fail("when comparing %s and %s: %s" % (first, second, failure_msg))
E AssertionError: when comparing [ -7 'NaT' 3 0 0 'NaT' -4 'NaT'] and [ -7 'NaT' 3 0 0 'NaT' -4 0]: numpy.timedelta64('NaT','D') != numpy.timedelta64(0,'D') : ufunc 'multiply' arrays differ ([array([ 2, 'NaT', 2, 0, -3, 'NaT', -3, 0], dtype='timedelta64[D]'), array([-3.5, nan, 1.5, 0. , 0. , -3.5, 1.5, nan]), array([ -7, 'NaT', 3, 0, 0, 'NaT', -4, 0], dtype='timedelta64[D]')]):
E args: exact
E expected [ -7 'NaT' 3 0 0 'NaT' -4 'NaT']
E got [ -7 'NaT' 3 0 0 'NaT' -4 0]
</cut>
--
4096R/DF5182C8
Debian Developer (stender at debian.org)
http://www.danielstender.com/
More information about the debian-science-maintainers
mailing list