On 2021/10/21 07:20, Bjorn Ketelaars wrote:
> +BUILD_DEPENDS= ${MODFORTRAN_BUILD_DEPENDS} \
> + devel/gas
Also needs lang/cython${MODPY_FLAVOR}, with this it builds ok on i386
and tests aren't looking too bad:
14 failed, 10899 passed, 88 skipped, 108 deselected, 19 xfailed, 2 xpassed, 5
warnings in 158.75 seconds
> pre-build:
> cp -f ${WRKSRC}/numpy/distutils/site.cfg ${WRKSRC}/site.cfg
> + ln -s ${LOCALBASE}/bin/gas ${WRKDIR}/bin/as
I change my recommendation to -fs instead of -s :)
test log below, bulk is ongoing but no failures yet.
cd /pobj/py-numpy-1.19.5-python3 && CC=cc PYTHONUSERBASE= PORTSDIR="/usr/ports"
LIBTOOL="/usr/bin/libtool"
PATH='/pobj/py-numpy-1.19.5-python3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin'
PREFIX='/usr/local' LOCALBASE='/usr/local' X11BASE='/usr/X11R6' CFLAGS='-O2
-pipe -D CYTHON_SMALL_CODE=' TRUEPREFIX='/usr/local' DESTDIR=''
HOME='/py-numpy-1.19.5_writes_to_HOME' PICFLAG="-fpic" BINGRP=bin BINOWN=root
BINMODE=755 NONBINMODE=644 DIRMODE=755 INSTALL_COPY=-c INSTALL_STRIP=-s
MANGRP=bin MANOWN=root MANMODE=644
BSD_INSTALL_PROGRAM="/pobj/py-numpy-1.19.5-python3/bin/install -c -s -m 755"
BSD_INSTALL_SCRIPT="/pobj/py-numpy-1.19.5-python3/bin/install -c -m 755"
BSD_INSTALL_DATA="/pobj/py-numpy-1.19.5-python3/bin/install -c -m 644"
BSD_INSTALL_MAN="/pobj/py-numpy-1.19.5-python3/bin/install -c -m 644"
BSD_INSTALL_PROGRAM_DIR="/pobj/py-numpy-1.19.5-python3/bin/install -d -m 755"
BSD_INSTALL_SCRIPT_DIR="/pobj/py-numpy-1.19.5-python3/bin/install -d -m 755"
BSD_INSTALL_DATA_DIR="/pobj/py-numpy-1.19.5-python3/bin/install -d -m 755"
BSD_INSTALL_MAN_DIR="/pobj/py-numpy-1.19.5-python3/bin/install -d -m 755"
/usr/local/bin/python3.8 -c 'import numpy ; numpy.test()'
NumPy version 1.19.5
NumPy relaxed strides checking option: True
...............................................................x........ [ 0%]
.......................................................sss.............. [ 1%]
........................................................................ [ 1%]
........................................................................ [ 2%]
.....................................................x..........x..x.... [ 3%]
......x................................................................. [ 3%]
........................................................................ [ 4%]
....................................ssss................................ [ 5%]
x....................................................................... [ 5%]
........................................................................ [ 6%]
........................................................................ [ 7%]
........................................................................ [ 7%]
........................................................................ [ 8%]
........................................................................ [ 9%]
........................................................................ [ 9%]
........................................................................ [ 10%]
........................................................................ [ 11%]
........................................................................ [ 11%]
........................................................................ [ 12%]
........................................................................ [ 13%]
........................................................................ [ 13%]
.......Fsssss.s......ssss.sss........................................... [ 14%]
.....................................................................s.. [ 15%]
...............................xx....................................... [ 15%]
........................................................................ [ 16%]
...............s........................................................ [ 16%]
........................................................................ [ 17%]
........................................................................ [ 18%]
........................................................................ [ 18%]
........................................................................ [ 19%]
........................................................................ [ 20%]
........................................................................ [ 20%]
.................................................x...X.................. [ 21%]
.......F................................................................ [ 22%]
.................................................xx..................... [ 22%]
........................................................................ [ 23%]
........................................................................ [ 24%]
........................................................................ [ 24%]
...............F........................................................ [ 25%]
........................................................................ [ 26%]
........................................................................ [ 26%]
........................................................................ [ 27%]
...................................ss................................... [ 28%]
.F...................................................................... [ 28%]
.................s............................................s......... [ 29%]
........................................................................ [ 30%]
........................................................................ [ 30%]
........................................................................ [ 31%]
........................................................................ [ 32%]
........................................................................ [ 32%]
........................................................................ [ 33%]
...........................................F..........F................. [ 33%]
........................................................................ [ 34%]
...................................FF.FFF.........................s.ss.s [ 35%]
..s.......s............................................................. [ 35%]
........................................................................ [ 36%]
........................................................................ [ 37%]
........................................................................ [ 37%]
........................................................................ [ 38%]
..............................................F.........s...........ssss [ 39%]
sssssssssss...............sssssssssssssss............................... [ 39%]
........................................................................ [ 40%]
........................................................................ [ 41%]
........................................................................ [ 41%]
........................................................................ [ 42%]
........................................................................ [ 43%]
........................................................................ [ 43%]
........................................................................ [ 44%]
........................................................................ [ 45%]
........................................................................ [ 45%]
.................x...................................................... [ 46%]
........................................................................ [ 47%]
........................................................................ [ 47%]
........................................................................ [ 48%]
........................................................................ [ 48%]
........................................................................ [ 49%]
........................................................................ [ 50%]
........................................................................ [ 50%]
.............................................................s.......... [ 51%]
........................................................................ [ 52%]
.................................................................x...... [ 52%]
........................................................................ [ 53%]
........................................................................ [ 54%]
........................................................................ [ 54%]
........................................................................ [ 55%]
........................................................................ [ 56%]
........................................................................ [ 56%]
........................................................................ [ 57%]
........................................................................ [ 58%]
........................................................................ [ 58%]
........................................................................ [ 59%]
........................................................................ [ 60%]
........................................................................ [ 60%]
......x................................................................. [ 61%]
s....................................................................... [ 62%]
........................................................................ [ 62%]
..............s......................................................... [ 63%]
........................................................................ [ 64%]
........................................................................ [ 64%]
........................................................................ [ 65%]
......................x................................................. [ 65%]
........................................................................ [ 66%]
........................................................................ [ 67%]
........................................................................ [ 67%]
........................................................................ [ 68%]
........................................................................ [ 69%]
........................................................................ [ 69%]
........................................................................ [ 70%]
........................................................................ [ 71%]
........................................................................ [ 71%]
........................................................................ [ 72%]
........................................................................ [ 73%]
........................................................................ [ 73%]
........................................................................ [ 74%]
........................................................................ [ 75%]
........................................................................ [ 75%]
........................................................................ [ 76%]
........................................................................ [ 77%]
........................................................................ [ 77%]
........................................................................ [ 78%]
.....................xx................................................. [ 79%]
........................................................................ [ 79%]
........................................................................ [ 80%]
........................................................................ [ 81%]
........................................................................ [ 81%]
........................................................................ [ 82%]
........................................................................ [ 82%]
........................................................................ [ 83%]
........................................................................ [ 84%]
........................................................................ [ 84%]
........................................................................ [ 85%]
........................................................................ [ 86%]
........................................................................ [ 86%]
........................................................................ [ 87%]
........................................................................ [ 88%]
..................................s................s................s... [ 88%]
..............s....ss................................................... [ 89%]
........................................................................ [ 90%]
..F................................F.................................... [ 90%]
........................................................................ [ 91%]
........................................................................ [ 92%]
................................................................s....... [ 92%]
........................................................................ [ 93%]
.....................................................................s.. [ 94%]
..............s......................................................... [ 94%]
........................................................................ [ 95%]
........................................................................ [ 96%]
..............................................................ss........ [ 96%]
........................................................................ [ 97%]
........................................................................ [ 97%]
......................................ssssssss.......................... [ 98%]
........................................................sss............. [ 99%]
........................................................................ [ 99%]
..xxX. [100%]
=================================== FAILURES ===================================
_____________________________ test_repr_roundtrip ______________________________
@pytest.mark.skipif(LD_INFO.precision + 2 >= repr_precision,
reason="repr precision not enough to show eps")
def test_repr_roundtrip():
# We will only see eps in repr if within printing precision.
o = 1 + LD_INFO.eps
> assert_equal(np.longdouble(repr(o)), o, "repr was %s" % repr(o))
E AssertionError:
E Items are not equal: repr was 1.0000000000000000001
E ACTUAL: 1.0
E DESIRED: 1.0000000000000000001
o = 1.0000000000000000001
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_longdouble.py:37:
AssertionError
_________________ TestFloatExceptions.test_floating_exceptions _________________
self = <numpy.core.tests.test_numeric.TestFloatExceptions object at 0x7990b2e0>
def test_floating_exceptions(self):
# Test basic arithmetic function errors
with np.errstate(all='raise'):
# Test for all real and complex float types
for typecode in np.typecodes['AllFloat']:
ftype = np.obj2sctype(typecode)
if np.dtype(ftype).kind == 'f':
# Get some extreme values for the type
fi = np.finfo(ftype)
ft_tiny = fi.tiny
ft_max = fi.max
ft_eps = fi.eps
underflow = 'underflow'
divbyzero = 'divide by zero'
else:
# 'c', complex, corresponding real dtype
rtype = type(ftype(0).real)
fi = np.finfo(rtype)
ft_tiny = ftype(fi.tiny)
ft_max = ftype(fi.max)
ft_eps = ftype(fi.eps)
# The complex types raise different exceptions
underflow = ''
divbyzero = ''
overflow = 'overflow'
invalid = 'invalid'
self.assert_raises_fpe(underflow,
lambda a, b: a/b, ft_tiny, ft_max)
self.assert_raises_fpe(underflow,
lambda a, b: a*b, ft_tiny, ft_tiny)
self.assert_raises_fpe(overflow,
lambda a, b: a*b, ft_max, ftype(2))
self.assert_raises_fpe(overflow,
lambda a, b: a/b, ft_max, ftype(0.5))
self.assert_raises_fpe(overflow,
lambda a, b: a+b, ft_max, ft_max*ft_eps)
self.assert_raises_fpe(overflow,
lambda a, b: a-b, -ft_max, ft_max*ft_eps)
> self.assert_raises_fpe(overflow,
np.power, ftype(2), ftype(2**fi.nexp))
divbyzero = 'divide by zero'
fi = finfo(resolution=1e-18, min=-1.189731495357231765e+4932,
max=1.189731495357231765e+4932, dtype=float96)
ft_eps = 1.084202172485504434e-19
ft_max = 1.189731495357231765e+4932
ft_tiny = 3.3621031431120935063e-4932
ftype = <class 'numpy.float96'>
invalid = 'invalid'
overflow = 'overflow'
self = <numpy.core.tests.test_numeric.TestFloatExceptions object at
0x7990b2e0>
typecode = 'g'
underflow = 'underflow'
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_numeric.py:649:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <numpy.core.tests.test_numeric.TestFloatExceptions object at 0x7990b2e0>
fpeerr = 'overflow', flop = <ufunc 'power'>, x = 2.0, y = 32768.0
def assert_raises_fpe(self, fpeerr, flop, x, y):
ftype = type(x)
try:
flop(x, y)
> assert_(False,
"Type %s did not raise fpe error '%s'." % (ftype, fpeerr))
E AssertionError: Type <class 'numpy.float96'> did not raise
fpe error 'overflow'.
flop = <ufunc 'power'>
fpeerr = 'overflow'
ftype = <class 'numpy.float96'>
self = <numpy.core.tests.test_numeric.TestFloatExceptions object at
0x7990b2e0>
x = 2.0
y = 32768.0
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_numeric.py:592:
AssertionError
______________ TestCommaDecimalPointLocale.test_locale_longdouble ______________
self = <numpy.core.tests.test_print.TestCommaDecimalPointLocale object at
0x618b7ef8>
def test_locale_longdouble(self):
> assert_equal(str(np.longdouble('1.2')), str(float(1.2)))
E AssertionError:
E Items are not equal:
E ACTUAL: '1.1999999999999999556'
E DESIRED: '1.2'
self = <numpy.core.tests.test_print.TestCommaDecimalPointLocale object at
0x618b7ef8>
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_print.py:200:
AssertionError
_______ TestAsIntegerRatio.test_roundtrip[float96-frac_vals3-exp_vals3] ________
self = <numpy.core.tests.test_scalar_methods.TestAsIntegerRatio object at
0x6f9def10>
ftype = <class 'numpy.float96'>
frac_vals = [0.0, 0.20492557202724854, 0.4277180662199366, 0.9888085019891495,
0.9620175814461964]
exp_vals = [0, -7400, 14266, -7822, -8721]
@pytest.mark.parametrize("ftype, frac_vals, exp_vals", [
# dtype test cases generated using hypothesis
# first five generated cases per dtype
(np.half, [0.0, 0.01154830649280303, 0.31082276347447274,
0.527350517124794, 0.8308562335072596],
[0, 1, 0, -8, 12]),
(np.single, [0.0, 0.09248576989263226, 0.8160498218131407,
0.17389442853722373, 0.7956044195067877],
[0, 12, 10, 17, -26]),
(np.double, [0.0, 0.031066908499895136, 0.5214135908877832,
0.45780736035689296, 0.5906586745934036],
[0, -801, 51, 194, -653]),
pytest.param(
np.longdouble,
[0.0, 0.20492557202724854, 0.4277180662199366, 0.9888085019891495,
0.9620175814461964],
[0, -7400, 14266, -7822, -8721],
marks=[
pytest.mark.skipif(
np.finfo(np.double) == np.finfo(np.longdouble),
reason="long double is same as double"),
pytest.mark.skipif(
platform.machine().startswith("ppc"),
reason="IBM double double"),
]
)
])
def test_roundtrip(self, ftype, frac_vals, exp_vals):
for frac, exp in zip(frac_vals, exp_vals):
f = np.ldexp(frac, exp, dtype=ftype)
n, d = f.as_integer_ratio()
try:
# workaround for gh-9968
nf = np.longdouble(str(n))
df = np.longdouble(str(d))
except (OverflowError, RuntimeWarning):
# the values may not fit in any float type
pytest.skip("longdouble too small on this platform")
> assert_equal(nf / df, f, "{}/{}".format(n, d))
E AssertionError:
E Items are not equal:
E
3691610919282409/754375680691097236033584094668765944067705441889753674869485796085770092515607327880959819087415077310180831709250071778801287977936115798436742371143992368453309871339424824507370309612423991424025874726454403135880239672556286954660294121782394806511373424058465039879202642605192131185743309561773056658185643547491539724788761769210570449719361033472835592719630976282559609730666069011705207542835117783529456159976771068263443230862911070356085655512183568229525202212897582406915374431067163048920606924662447046633826157512843858040924984315002169964536919904833881600804823521998389050496201243764285020447088741911345402883776356409423618880520468699696461129565113383915078637888733348216610096416629009182140275042468304535253989090448531420190513342250077305957003590418954211756405910688496208336958811080736128883827111614802254709920609202253178469621573457448759462719349118711156981864214570260508501086198368460193729395300772852011148550274868441005428390349180473804178677855504742682719953569150709524928692141975992287146458274133866411756809197929729769982812952002538493837333502552947090842216481359257075037724248961524397639883688816153646148628194727053307179727164298352718970844091417026255969094016476863206390918289333298449771866559630416885921333953743755493548839734888473604855021779585195333732043601711181668030053412580029770776192004858284404501049116419958516004280221863344539130718890716799847298773006561233919104469517725028712116182966271984150326053820625659202133419895341643186410353978237088665855990317609669897114719909146571036161198418024588113758379810073902705587813521979935291050562779838944606837754397025785661345639033424453056427885477427402278247912504082637379955585065327609406091875295801383271067322140033858622268255767636731544112870609623732470608795732545842544909415005476326698182515362320822724958131487825195570623952649884606742148812903910210714982986036413200478042831492804684264633275837769140282453505276667858585847988388110379917363524869040482763991338620804822859199828168115455114341494723055337599462542402834637455880078429265889822008874978612108568914036745145011041758569845539707668192653549132816696385729078204249119162383710467822172412843323817984
E ACTUAL: 0.0
E DESIRED: 4.8935974657884746724e-2229
d = 754375680691097236...2172412843323817984
df = inf
exp = -7400
exp_vals = [0, -7400, 14266, -7822, -8721]
f = 4.8935974657884746724e-2229
frac = 0.20492557202724854
frac_vals = [0.0, 0.20492557202724854, 0.4277180662199366, 0.9888085019891495,
0.9620175814461964]
ftype = <class 'numpy.float96'>
n = 3691610919282409
nf = 3691610919282409.0
self = <numpy.core.tests.test_scalar_methods.TestAsIntegerRatio object at
0x6f9def10>
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_scalar_methods.py:103:
AssertionError
__________________________ TestLog2.test_log2_special __________________________
self = <numpy.core.tests.test_umath.TestLog2 object at 0x6f2d1178>
def test_log2_special(self):
assert_equal(np.log2(1.), 0.)
assert_equal(np.log2(np.inf), np.inf)
assert_(np.isnan(np.log2(np.nan)))
with warnings.catch_warnings(record=True) as w:
warnings.filterwarnings('always', '', RuntimeWarning)
assert_(np.isnan(np.log2(-1.)))
assert_(np.isnan(np.log2(-np.inf)))
assert_equal(np.log2(0.), -np.inf)
assert_(w[0].category is RuntimeWarning)
assert_(w[1].category is RuntimeWarning)
> assert_(w[2].category is RuntimeWarning)
E IndexError: list index out of range
self = <numpy.core.tests.test_umath.TestLog2 object at 0x6f2d1178>
w = [<warnings.WarningMessage object at 0x6f2d12b0>,
<warnings.WarningMessage object at 0x6f2d1280>]
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:588:
IndexError
______________________ TestSpecialFloats.test_log_values _______________________
self = <numpy.core.tests.test_umath.TestSpecialFloats object at 0x6f2d1b38>
def test_log_values(self):
with np.errstate(all='ignore'):
x = [np.nan, np.nan, np.inf, np.nan, -np.inf, np.nan]
y = [np.nan, -np.nan, np.inf, -np.inf, 0., -1.0]
for dt in ['f', 'd', 'g']:
xf = np.array(x, dtype=dt)
yf = np.array(y, dtype=dt)
assert_equal(np.log(yf), xf)
with np.errstate(divide='raise'):
> assert_raises(FloatingPointError, np.log, np.float32(0.))
dt = 'g'
self = <numpy.core.tests.test_umath.TestSpecialFloats object at
0x6f2d1b38>
x = [nan, nan, inf, nan, -inf, nan]
xf = array([ nan, nan, inf, nan, -inf, nan], dtype=float96)
y = [nan, nan, inf, -inf, 0.0, -1.0]
yf = array([ nan, nan, inf, -inf, 0., -1.], dtype=float96)
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:705:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.8/unittest/case.py:816: in assertRaises
return context.handle('assertRaises', args, kwargs)
/usr/local/lib/python3.8/unittest/case.py:202: in handle
callable_obj(*args, **kwargs)
/usr/local/lib/python3.8/unittest/case.py:224: in __exit__
self._raiseFailure("{} not raised by {}".format(exc_name,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <unittest.case._AssertRaisesContext object at 0x6f2d1d30>
standardMsg = 'FloatingPointError not raised by log'
def _raiseFailure(self, standardMsg):
msg = self.test_case._formatMessage(self.msg, standardMsg)
> raise self.test_case.failureException(msg)
E AssertionError: FloatingPointError not raised by log
msg = 'FloatingPointError not raised by log'
self = <unittest.case._AssertRaisesContext object at 0x6f2d1d30>
standardMsg = 'FloatingPointError not raised by log'
/usr/local/lib/python3.8/unittest/case.py:164: AssertionError
____________________ TestComplexFunctions.test_branch_cuts _____________________
self = <numpy.core.tests.test_umath.TestComplexFunctions object at 0x6bd01b38>
def test_branch_cuts(self):
# check branch cuts and continuity on them
_check_branch_cut(np.log, -0.5, 1j, 1, -1, True)
_check_branch_cut(np.log2, -0.5, 1j, 1, -1, True)
_check_branch_cut(np.log10, -0.5, 1j, 1, -1, True)
_check_branch_cut(np.log1p, -1.5, 1j, 1, -1, True)
_check_branch_cut(np.sqrt, -0.5, 1j, 1, -1, True)
_check_branch_cut(np.arcsin, [ -2, 2], [1j, 1j], 1, -1, True)
_check_branch_cut(np.arccos, [ -2, 2], [1j, 1j], 1, -1, True)
> _check_branch_cut(np.arctan, [0-2j, 2j], [1, 1], -1, 1, True)
self = <numpy.core.tests.test_umath.TestComplexFunctions object at
0x6bd01b38>
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2757:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
f = <ufunc 'arctan'>, x0 = array([0.-2.j, 0.+2.j]), dx = array([1.+0.j, 1.+0.j])
re_sign = -1, im_sign = 1, sig_zero_ok = True, dtype = <class 'complex'>
def _check_branch_cut(f, x0, dx, re_sign=1, im_sign=-1, sig_zero_ok=False,
dtype=complex):
"""
Check for a branch cut in a function.
Assert that `x0` lies on a branch cut of function `f` and `f` is
continuous from the direction `dx`.
Parameters
----------
f : func
Function to check
x0 : array-like
Point on branch cut
dx : array-like
Direction to check continuity in
re_sign, im_sign : {1, -1}
Change of sign of the real or imaginary part expected
sig_zero_ok : bool
Whether to check if the branch cut respects signed zero (if
applicable)
dtype : dtype
Dtype to check (should be complex)
"""
x0 = np.atleast_1d(x0).astype(dtype)
dx = np.atleast_1d(dx).astype(dtype)
if np.dtype(dtype).char == 'F':
scale = np.finfo(dtype).eps * 1e2
atol = np.float32(1e-2)
else:
scale = np.finfo(dtype).eps * 1e3
atol = 1e-4
y0 = f(x0)
yp = f(x0 + dx*scale*np.absolute(x0)/np.absolute(dx))
ym = f(x0 - dx*scale*np.absolute(x0)/np.absolute(dx))
> assert_(np.all(np.absolute(y0.real - yp.real) < atol), (y0, yp))
E AssertionError: (array([-1.57079633e+000-5.49306144e-001j,
E 1.00000000e+308+1.00000000e+308j]),
array([1.57079633-0.54930614j, 1.57079633+0.54930614j]))
atol = 0.0001
dtype = <class 'complex'>
dx = array([1.+0.j, 1.+0.j])
f = <ufunc 'arctan'>
im_sign = 1
re_sign = -1
scale = 2.220446049250313e-13
sig_zero_ok = True
x0 = array([0.-2.j, 0.+2.j])
y0 = array([-1.57079633e+000-5.49306144e-001j,
1.00000000e+308+1.00000000e+308j])
ym = array([-1.57079633-0.54930614j, -1.57079633+0.54930614j])
yp = array([1.57079633-0.54930614j, 1.57079633+0.54930614j])
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:3002:
AssertionError
_______________ TestComplexFunctions.test_branch_cuts_complex64 ________________
self = <numpy.core.tests.test_umath.TestComplexFunctions object at 0x6bd071f0>
def test_branch_cuts_complex64(self):
# check branch cuts and continuity on them
_check_branch_cut(np.log, -0.5, 1j, 1, -1, True, np.complex64)
_check_branch_cut(np.log2, -0.5, 1j, 1, -1, True, np.complex64)
_check_branch_cut(np.log10, -0.5, 1j, 1, -1, True, np.complex64)
_check_branch_cut(np.log1p, -1.5, 1j, 1, -1, True, np.complex64)
_check_branch_cut(np.sqrt, -0.5, 1j, 1, -1, True, np.complex64)
_check_branch_cut(np.arcsin, [ -2, 2], [1j, 1j], 1, -1, True,
np.complex64)
_check_branch_cut(np.arccos, [ -2, 2], [1j, 1j], 1, -1, True,
np.complex64)
> _check_branch_cut(np.arctan, [0-2j, 2j], [1, 1], -1, 1, True,
> np.complex64)
self = <numpy.core.tests.test_umath.TestComplexFunctions object at
0x6bd071f0>
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2782:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
f = <ufunc 'arctan'>, x0 = array([0.-2.j, 0.+2.j], dtype=complex64)
dx = array([1.+0.j, 1.+0.j], dtype=complex64), re_sign = -1, im_sign = 1
sig_zero_ok = True, dtype = <class 'numpy.complex64'>
def _check_branch_cut(f, x0, dx, re_sign=1, im_sign=-1, sig_zero_ok=False,
dtype=complex):
"""
Check for a branch cut in a function.
Assert that `x0` lies on a branch cut of function `f` and `f` is
continuous from the direction `dx`.
Parameters
----------
f : func
Function to check
x0 : array-like
Point on branch cut
dx : array-like
Direction to check continuity in
re_sign, im_sign : {1, -1}
Change of sign of the real or imaginary part expected
sig_zero_ok : bool
Whether to check if the branch cut respects signed zero (if
applicable)
dtype : dtype
Dtype to check (should be complex)
"""
x0 = np.atleast_1d(x0).astype(dtype)
dx = np.atleast_1d(dx).astype(dtype)
if np.dtype(dtype).char == 'F':
scale = np.finfo(dtype).eps * 1e2
atol = np.float32(1e-2)
else:
scale = np.finfo(dtype).eps * 1e3
atol = 1e-4
y0 = f(x0)
yp = f(x0 + dx*scale*np.absolute(x0)/np.absolute(dx))
ym = f(x0 - dx*scale*np.absolute(x0)/np.absolute(dx))
> assert_(np.all(np.absolute(y0.real - yp.real) < atol), (y0, yp))
E AssertionError: (array([1.5707963e+00-5.4930615e-01j,
9.9999997e+37+9.9999997e+37j],
E dtype=complex64), array([1.5707884-0.54930615j,
1.5707884+0.54930615j], dtype=complex64))
atol = 0.01
dtype = <class 'numpy.complex64'>
dx = array([1.+0.j, 1.+0.j], dtype=complex64)
f = <ufunc 'arctan'>
im_sign = 1
re_sign = -1
scale = 1.1920928955078125e-05
sig_zero_ok = True
x0 = array([0.-2.j, 0.+2.j], dtype=complex64)
y0 = array([1.5707963e+00-5.4930615e-01j, 9.9999997e+37+9.9999997e+37j],
dtype=complex64)
ym = array([-1.5707884-0.54930615j, -1.5707884+0.54930615j],
dtype=complex64)
yp = array([1.5707884-0.54930615j, 1.5707884+0.54930615j],
dtype=complex64)
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:3002:
AssertionError
____________ TestComplexFunctions.test_loss_of_precision[complex64] ____________
self = <numpy.core.tests.test_umath.TestComplexFunctions object at 0x6872fc58>
dtype = <class 'numpy.complex64'>
@pytest.mark.parametrize('dtype', [np.complex64, np.complex_,
np.longcomplex])
def test_loss_of_precision(self, dtype):
"""Check loss of precision in complex arc* functions"""
# Check against known-good functions
info = np.finfo(dtype)
real_dtype = dtype(0.).real.dtype
eps = info.eps
def check(x, rtol):
x = x.astype(real_dtype)
z = x.astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsinh'))
z = (1j*x).astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsin(z).imag - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsin'))
z = x.astype(dtype)
d = np.absolute(np.arctanh(x)/np.arctanh(z).real - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arctanh'))
z = (1j*x).astype(dtype)
d = np.absolute(np.arctanh(x)/np.arctan(z).imag - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arctan'))
# The switchover was chosen as 1e-3; hence there can be up to
# ~eps/1e-3 of relative cancellation error before it
x_series = np.logspace(-20, -3.001, 200)
x_basic = np.logspace(-2.999, 0, 10, endpoint=False)
if dtype is np.longcomplex:
# It's not guaranteed that the system-provided arc functions
# are accurate down to a few epsilons. (Eg. on Linux 64-bit)
# So, give more leeway for long complex tests here:
# Can use 2.1 for > Ubuntu LTS Trusty (2014), glibc = 2.19.
if skip_longcomplex_msg:
pytest.skip(skip_longcomplex_msg)
check(x_series, 50.0*eps)
else:
> check(x_series, 2.1*eps)
check = <function
TestComplexFunctions.test_loss_of_precision.<locals>.check at 0x70799340>
dtype = <class 'numpy.complex64'>
eps = 1.1920929e-07
info = finfo(resolution=1e-06, min=-3.4028235e+38, max=3.4028235e+38,
dtype=float32)
real_dtype = dtype('float32')
self = <numpy.core.tests.test_umath.TestComplexFunctions object at
0x6872fc58>
x_basic = array([0.00100231, 0.0019994 , 0.00398841, 0.0079561 , 0.01587084,
0.0316592 , 0.06315387, 0.12597953, 0.25130435, 0.50130265])
x_series = array([1.00000000e-20, 1.21736864e-20, 1.48198641e-20,
1.80412378e-20,
2.19628372e-20, 2.67368693e-20, 3.254862...3.06526013e-04,
3.73155156e-04, 4.54267386e-04,
5.53010871e-04, 6.73218092e-04, 8.19554595e-04, 9.97700064e-04])
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2864:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x = array([9.99999968e-21, 1.21736865e-20, 1.48198648e-20, 1.80412373e-20,
2.19628376e-20, 2.67368701e-20, 3.254862...55170e-04, 4.54267400e-04,
5.53010846e-04, 6.73218106e-04, 8.19554611e-04, 9.97700030e-04],
dtype=float32)
rtol = 2.5033950805664064e-07
def check(x, rtol):
x = x.astype(real_dtype)
z = x.astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
> assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsinh'))
E AssertionError: (0, 1e-20, inf, 'arcsinh')
d = array([ inf, inf, inf,
inf,
inf, inf, ...17506e-04, 8.02278519e-05,
6.28232956e-05, 6.73532486e-06, 1.53779984e-05, 4.31537628e-05],
dtype=float32)
dtype = <class 'numpy.complex64'>
real_dtype = dtype('float32')
rtol = 2.5033950805664064e-07
x = array([9.99999968e-21, 1.21736865e-20, 1.48198648e-20,
1.80412373e-20,
2.19628376e-20, 2.67368701e-20, 3.254862...55170e-04, 4.54267400e-04,
5.53010846e-04, 6.73218106e-04, 8.19554611e-04, 9.97700030e-04],
dtype=float32)
z = array([9.99999968e-21+0.j, 1.21736865e-20+0.j, 1.48198648e-20+0.j,
1.80412373e-20+0.j, 2.19628376e-20+0.j, 2.67...67400e-04+0.j,
5.53010846e-04+0.j, 6.73218106e-04+0.j,
8.19554611e-04+0.j, 9.97700030e-04+0.j], dtype=complex64)
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2831:
AssertionError
___________ TestComplexFunctions.test_loss_of_precision[complex128] ____________
self = <numpy.core.tests.test_umath.TestComplexFunctions object at 0x6bcfa7a8>
dtype = <class 'numpy.complex128'>
@pytest.mark.parametrize('dtype', [np.complex64, np.complex_,
np.longcomplex])
def test_loss_of_precision(self, dtype):
"""Check loss of precision in complex arc* functions"""
# Check against known-good functions
info = np.finfo(dtype)
real_dtype = dtype(0.).real.dtype
eps = info.eps
def check(x, rtol):
x = x.astype(real_dtype)
z = x.astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsinh'))
z = (1j*x).astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsin(z).imag - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsin'))
z = x.astype(dtype)
d = np.absolute(np.arctanh(x)/np.arctanh(z).real - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arctanh'))
z = (1j*x).astype(dtype)
d = np.absolute(np.arctanh(x)/np.arctan(z).imag - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arctan'))
# The switchover was chosen as 1e-3; hence there can be up to
# ~eps/1e-3 of relative cancellation error before it
x_series = np.logspace(-20, -3.001, 200)
x_basic = np.logspace(-2.999, 0, 10, endpoint=False)
if dtype is np.longcomplex:
# It's not guaranteed that the system-provided arc functions
# are accurate down to a few epsilons. (Eg. on Linux 64-bit)
# So, give more leeway for long complex tests here:
# Can use 2.1 for > Ubuntu LTS Trusty (2014), glibc = 2.19.
if skip_longcomplex_msg:
pytest.skip(skip_longcomplex_msg)
check(x_series, 50.0*eps)
else:
> check(x_series, 2.1*eps)
check = <function
TestComplexFunctions.test_loss_of_precision.<locals>.check at 0x6d9d1220>
dtype = <class 'numpy.complex128'>
eps = 2.220446049250313e-16
info = finfo(resolution=1e-15, min=-1.7976931348623157e+308,
max=1.7976931348623157e+308, dtype=float64)
real_dtype = dtype('float64')
self = <numpy.core.tests.test_umath.TestComplexFunctions object at
0x6bcfa7a8>
x_basic = array([0.00100231, 0.0019994 , 0.00398841, 0.0079561 , 0.01587084,
0.0316592 , 0.06315387, 0.12597953, 0.25130435, 0.50130265])
x_series = array([1.00000000e-20, 1.21736864e-20, 1.48198641e-20,
1.80412378e-20,
2.19628372e-20, 2.67368693e-20, 3.254862...3.06526013e-04,
3.73155156e-04, 4.54267386e-04,
5.53010871e-04, 6.73218092e-04, 8.19554595e-04, 9.97700064e-04])
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2864:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x = array([1.00000000e-20, 1.21736864e-20, 1.48198641e-20, 1.80412378e-20,
2.19628372e-20, 2.67368693e-20, 3.254862...3.06526013e-04,
3.73155156e-04, 4.54267386e-04,
5.53010871e-04, 6.73218092e-04, 8.19554595e-04, 9.97700064e-04])
rtol = 4.662936703425658e-16
def check(x, rtol):
x = x.astype(real_dtype)
z = x.astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
> assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsinh'))
E AssertionError: (0, 1e-20, inf, 'arcsinh')
d = array([ inf, inf, inf,
inf,
inf, inf, ...1.10356169e-13,
5.87307980e-14, 9.10382880e-14,
9.85878046e-14, 1.76192394e-13, 2.36699549e-13, 5.06261699e-14])
dtype = <class 'numpy.complex128'>
real_dtype = dtype('float64')
rtol = 4.662936703425658e-16
x = array([1.00000000e-20, 1.21736864e-20, 1.48198641e-20,
1.80412378e-20,
2.19628372e-20, 2.67368693e-20, 3.254862...3.06526013e-04,
3.73155156e-04, 4.54267386e-04,
5.53010871e-04, 6.73218092e-04, 8.19554595e-04, 9.97700064e-04])
z = array([1.00000000e-20+0.j, 1.21736864e-20+0.j, 1.48198641e-20+0.j,
1.80412378e-20+0.j, 2.19628372e-20+0.j, 2.67...0.j,
4.54267386e-04+0.j, 5.53010871e-04+0.j, 6.73218092e-04+0.j,
8.19554595e-04+0.j, 9.97700064e-04+0.j])
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2831:
AssertionError
___________ TestComplexFunctions.test_loss_of_precision[complex192] ____________
self = <numpy.core.tests.test_umath.TestComplexFunctions object at 0x6144cbe0>
dtype = <class 'numpy.complex192'>
@pytest.mark.parametrize('dtype', [np.complex64, np.complex_,
np.longcomplex])
def test_loss_of_precision(self, dtype):
"""Check loss of precision in complex arc* functions"""
# Check against known-good functions
info = np.finfo(dtype)
real_dtype = dtype(0.).real.dtype
eps = info.eps
def check(x, rtol):
x = x.astype(real_dtype)
z = x.astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsinh'))
z = (1j*x).astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsin(z).imag - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsin'))
z = x.astype(dtype)
d = np.absolute(np.arctanh(x)/np.arctanh(z).real - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arctanh'))
z = (1j*x).astype(dtype)
d = np.absolute(np.arctanh(x)/np.arctan(z).imag - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arctan'))
# The switchover was chosen as 1e-3; hence there can be up to
# ~eps/1e-3 of relative cancellation error before it
x_series = np.logspace(-20, -3.001, 200)
x_basic = np.logspace(-2.999, 0, 10, endpoint=False)
if dtype is np.longcomplex:
# It's not guaranteed that the system-provided arc functions
# are accurate down to a few epsilons. (Eg. on Linux 64-bit)
# So, give more leeway for long complex tests here:
# Can use 2.1 for > Ubuntu LTS Trusty (2014), glibc = 2.19.
if skip_longcomplex_msg:
pytest.skip(skip_longcomplex_msg)
> check(x_series, 50.0*eps)
check = <function
TestComplexFunctions.test_loss_of_precision.<locals>.check at 0x70799340>
dtype = <class 'numpy.complex192'>
eps = 1.084202172485504434e-19
info = finfo(resolution=1e-18, min=-1.189731495357231765e+4932,
max=1.189731495357231765e+4932, dtype=float96)
real_dtype = dtype('float96')
self = <numpy.core.tests.test_umath.TestComplexFunctions object at
0x6144cbe0>
x_basic = array([0.00100231, 0.0019994 , 0.00398841, 0.0079561 , 0.01587084,
0.0316592 , 0.06315387, 0.12597953, 0.25130435, 0.50130265])
x_series = array([1.00000000e-20, 1.21736864e-20, 1.48198641e-20,
1.80412378e-20,
2.19628372e-20, 2.67368693e-20, 3.254862...3.06526013e-04,
3.73155156e-04, 4.54267386e-04,
5.53010871e-04, 6.73218092e-04, 8.19554595e-04, 9.97700064e-04])
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2862:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x = array([1.00000000e-20, 1.21736864e-20, 1.48198641e-20, 1.80412378e-20,
2.19628372e-20, 2.67368693e-20, 3.254862...55156e-04, 4.54267386e-04,
5.53010871e-04, 6.73218092e-04, 8.19554595e-04, 9.97700064e-04],
dtype=float96)
rtol = 5.42101086242752217e-18
def check(x, rtol):
x = x.astype(real_dtype)
z = x.astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsinh'))
z = (1j*x).astype(dtype)
d = np.absolute(np.arcsinh(x)/np.arcsin(z).imag - 1)
assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arcsin'))
z = x.astype(dtype)
d = np.absolute(np.arctanh(x)/np.arctanh(z).real - 1)
> assert_(np.all(d < rtol), (np.argmax(d), x[np.argmax(d)], d.max(),
'arctanh'))
E AssertionError: (0, 9.9999999999999994515e-21, inf, 'arctanh')
d = array([ inf, inf, inf,
inf,
inf, inf, 2.008323...71554e-17, 1.17202255e-16,
1.46367293e-17, 7.48099499e-18, 1.55040911e-17, 3.19839641e-18],
dtype=float96)
dtype = <class 'numpy.complex192'>
real_dtype = dtype('float96')
rtol = 5.42101086242752217e-18
x = array([1.00000000e-20, 1.21736864e-20, 1.48198641e-20,
1.80412378e-20,
2.19628372e-20, 2.67368693e-20, 3.254862...55156e-04, 4.54267386e-04,
5.53010871e-04, 6.73218092e-04, 8.19554595e-04, 9.97700064e-04],
dtype=float96)
z = array([1.00000000e-20+0.j, 1.21736864e-20+0.j, 1.48198641e-20+0.j,
1.80412378e-20+0.j, 2.19628372e-20+0.j, 2.67...7386e-04+0.j,
5.53010871e-04+0.j, 6.73218092e-04+0.j,
8.19554595e-04+0.j, 9.97700064e-04+0.j], dtype=complex192)
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2841:
AssertionError
__________________________ TestExecCommand.test_basic __________________________
self = <numpy.distutils.tests.test_exec_command.TestExecCommand object at
0x752b5538>
def test_basic(self):
with redirect_stdout(StringIO()):
with redirect_stderr(StringIO()):
with assert_warns(DeprecationWarning):
if os.name == "posix":
> self.check_posix(use_tee=0)
self = <numpy.distutils.tests.test_exec_command.TestExecCommand object at
0x752b5538>
/usr/local/lib/python3.8/site-packages/numpy/distutils/tests/test_exec_command.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <numpy.distutils.tests.test_exec_command.TestExecCommand object at
0x752b5538>
kws = {'use_tee': 0}, s = 1, o = 'This account is currently not available.'
def check_posix(self, **kws):
s, o = exec_command.exec_command("echo Hello", **kws)
> assert_(s == 0)
E AssertionError
kws = {'use_tee': 0}
o = 'This account is currently not available.'
s = 1
self = <numpy.distutils.tests.test_exec_command.TestExecCommand object at
0x752b5538>
/usr/local/lib/python3.8/site-packages/numpy/distutils/tests/test_exec_command.py:112:
AssertionError
__________________ TestRandomDist.test_dirichlet_small_alpha ___________________
self = <numpy.random.tests.test_generator_mt19937.TestRandomDist object at
0x425c2460>
def test_dirichlet_small_alpha(self):
eps = 1.0e-9 # 1.0e-10 -> runtime x 10; 1e-11 -> runtime x 200, etc.
alpha = eps * np.array([1., 1.0e-3])
random = Generator(MT19937(self.seed))
actual = random.dirichlet(alpha, size=(3, 2))
expected = np.array([
[[1., 0.],
[1., 0.]],
[[1., 0.],
[1., 0.]],
[[1., 0.],
[1., 0.]]
])
> assert_array_almost_equal(actual, expected, decimal=15)
E AssertionError:
E Arrays are not almost equal to 15 decimals
E
E Mismatched elements: 12 / 12 (100%)
E Max absolute difference: 1.
E Max relative difference: 1.
E x: array([[[0., 1.],
E [0., 1.]],
E ...
E y: array([[[1., 0.],
E [1., 0.]],
E ...
actual = array([[[0., 1.],
[0., 1.]],
[[0., 1.],
[0., 1.]],
[[0., 1.],
[0., 1.]]])
alpha = array([1.e-09, 1.e-12])
eps = 1e-09
expected = array([[[1., 0.],
[1., 0.]],
[[1., 0.],
[1., 0.]],
[[1., 0.],
[1., 0.]]])
random = Generator(MT19937) at 0x73B198C8
self = <numpy.random.tests.test_generator_mt19937.TestRandomDist object
at 0x425c2460>
/usr/local/lib/python3.8/site-packages/numpy/random/tests/test_generator_mt19937.py:1137:
AssertionError
__________________________ TestRandomDist.test_pareto __________________________
self = <numpy.random.tests.test_generator_mt19937.TestRandomDist object at
0x5bb472e0>
def test_pareto(self):
random = Generator(MT19937(self.seed))
actual = random.pareto(a=.123456789, size=(3, 2))
desired = np.array([[1.0394926776069018e+00, 7.7142534343505773e+04],
[7.2640150889064703e-01, 3.4650454783825594e+05],
[4.5852344481994740e+04, 6.5851383009539105e+07]])
# For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this
# matrix differs by 24 nulps. Discussion:
#
https://mail.python.org/pipermail/numpy-discussion/2012-September/063801.html
# Consensus is that this is probably some gcc quirk that affects
# rounding but not in any important way, so we just use a looser
# tolerance on this test:
> np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30)
E AssertionError: X and Y are not equal to 30 ULP (max is 31)
actual = array([[1.03949268e+00, 7.71425343e+04],
[7.26401509e-01, 3.46504548e+05],
[4.58523445e+04, 6.58513830e+07]])
desired = array([[1.03949268e+00, 7.71425343e+04],
[7.26401509e-01, 3.46504548e+05],
[4.58523445e+04, 6.58513830e+07]])
random = Generator(MT19937) at 0x73B19A38
self = <numpy.random.tests.test_generator_mt19937.TestRandomDist object
at 0x5bb472e0>
/usr/local/lib/python3.8/site-packages/numpy/random/tests/test_generator_mt19937.py:1457:
AssertionError
=============================== warnings summary ===============================
/usr/local/lib/python3.8/site-packages/numpy/core/getlimits.py:401
/usr/local/lib/python3.8/site-packages/numpy/core/getlimits.py:401:
UserWarning: Signature b'\x00\xd0\xcc\xcc\xcc\xcc\xcc\xcc\xfb\xbf\xdf\xdf' for
<class 'numpy.float96'> does not match any known type: falling back to type
probe function
machar = _get_machar(dtype)
core/tests/test_scalar_methods.py::TestAsIntegerRatio::test_roundtrip[float96-frac_vals3-exp_vals3]
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_scalar_methods.py:98:
RuntimeWarning: overflow encountered in conversion from string
df = np.longdouble(str(d))
core/tests/test_umath.py::TestComplexFunctions::test_loss_of_precision[complex64]
core/tests/test_umath.py::TestComplexFunctions::test_loss_of_precision[complex128]
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2830:
RuntimeWarning: divide by zero encountered in true_divide
d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
core/tests/test_umath.py::TestComplexFunctions::test_loss_of_precision[complex192]
/usr/local/lib/python3.8/site-packages/numpy/core/tests/test_umath.py:2840:
RuntimeWarning: divide by zero encountered in true_divide
d = np.absolute(np.arctanh(x)/np.arctanh(z).real - 1)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
14 failed, 10899 passed, 88 skipped, 108 deselected, 19 xfailed, 2 xpassed, 5
warnings in 158.75 seconds