module documentation

Undocumented

Class TestAbsoluteNegative Undocumented
Class TestAdd Undocumented
Class TestArctan2SpecialValues Undocumented
Class TestAttributes Undocumented
Class TestAVXFloat32Transcendental Undocumented
Class TestAVXUfuncs Undocumented
Class TestBitwiseUFuncs Undocumented
Class TestBool Undocumented
Class TestCbrt Undocumented
Class TestChoose Undocumented
Class TestComparisons Undocumented
Class TestComplexFunctions No class docstring; 0/1 class variable, 1/7 method documented
Class TestConstants Undocumented
Class TestDegrees Undocumented
Class TestDivision Undocumented
Class TestDivisionIntegerOverflowsAndDivideByZero Undocumented
Class TestExp Undocumented
Class TestExp2 Undocumented
Class TestExpm1 Undocumented
Class TestFloat_power Undocumented
Class TestFloatingPoint Undocumented
Class TestFmax Undocumented
Class TestFmin Undocumented
Class TestFPClass Undocumented
Class TestFRExp Undocumented
Class TestFrompyfunc Undocumented
Class TestHeavside Undocumented
Class TestHypot Undocumented
Class TestHypotSpecialValues Undocumented
Class TestInt Undocumented
Class TestLDExp Undocumented
Class TestLdexp Undocumented
Class TestLog Undocumented
Class TestLog1p Undocumented
Class TestLog2 Undocumented
Class TestLogAddExp Undocumented
Class TestLogAddExp2 Undocumented
Class TestMaximum Undocumented
Class TestMinimum Undocumented
Class TestMinMax Undocumented
Class TestOut Undocumented
Class TestPositive Undocumented
Class TestPower Undocumented
Class TestRadians Undocumented
Class TestRationalFunctions Undocumented
Class TestRemainder Undocumented
Class TestRoundingFunctions No class docstring; 2/3 methods documented
Class TestSign Undocumented
Class TestSpecialFloats Undocumented
Class TestSpecialMethods Undocumented
Class TestSubclass Undocumented
Function assert_arctan2_isnan Undocumented
Function assert_arctan2_isninf Undocumented
Function assert_arctan2_isnzero Undocumented
Function assert_arctan2_ispinf Undocumented
Function assert_arctan2_ispzero Undocumented
Function assert_hypot_isinf Undocumented
Function assert_hypot_isnan Undocumented
Function bad_arcsinh The blocklisted trig functions are not accurate on aarch64/PPC for complex256. Rather than dig through the actual problem skip the test. This should be fixed when we can move past glibc2.17 which is the version in manylinux2014...
Function floor_divide_and_remainder Undocumented
Function interesting_binop_operands Helper to create "interesting" operands to cover common code paths: * scalar inputs * only first "values" is an array (e.g. scalar division fast-paths) * Longer array (SIMD) placing the value of interest at different positions * Oddly strided arrays which may not be SIMD compatible...
Function on_powerpc True if we are running on a Power PC platform.
Function test_bad_legacy_gufunc_silent_errors Undocumented
Function test_bad_legacy_ufunc_silent_errors Undocumented
Function test_complex_nan_comparisons Undocumented
Function test_copysign Undocumented
Function test_memoverlap_accumulate Undocumented
Function test_memoverlap_accumulate_cmp Undocumented
Function test_memoverlap_accumulate_symmetric Undocumented
Function test_nextafter Undocumented
Function test_nextafter_0 Undocumented
Function test_nextafter_vs_spacing Undocumented
Function test_nextafterf Undocumented
Function test_nextafterl Undocumented
Function test_outer_bad_subclass Undocumented
Function test_outer_exceeds_maxdims Undocumented
Function test_outer_subclass_preserve Undocumented
Function test_pos_nan Check np.nan is a positive nan.
Function test_reduceat Test bug in reduceat when structured arrays are not copied.
Function test_reduceat_empty Reduceat should work with empty arrays
Function test_rint_big_int Undocumented
Function test_signaling_nan_exceptions Undocumented
Function test_spacing Undocumented
Function test_spacing_gfortran Undocumented
Function test_spacingf Undocumented
Function test_spacingl Undocumented
Constant UFUNCS Undocumented
Constant UFUNCS_BINARY Undocumented
Constant UFUNCS_BINARY_ACC Undocumented
Constant UFUNCS_UNARY Undocumented
Constant UFUNCS_UNARY_FP Undocumented
Variable avx_ufuncs Undocumented
Class _FilterInvalids Undocumented
Function _check_branch_cut Check for a branch cut in a function.
Function _signs Undocumented
Function _test_nextafter Undocumented
Function _test_spacing Undocumented
def assert_arctan2_isnan(x, y): (source)

Undocumented

def assert_arctan2_isninf(x, y): (source)

Undocumented

def assert_arctan2_isnzero(x, y): (source)

Undocumented

def assert_arctan2_ispinf(x, y): (source)

Undocumented

def assert_arctan2_ispzero(x, y): (source)

Undocumented

def assert_hypot_isinf(x, y): (source)

Undocumented

def assert_hypot_isnan(x, y): (source)

Undocumented

def bad_arcsinh(): (source)

The blocklisted trig functions are not accurate on aarch64/PPC for complex256. Rather than dig through the actual problem skip the test. This should be fixed when we can move past glibc2.17 which is the version in manylinux2014

def floor_divide_and_remainder(x, y): (source)

Undocumented

def interesting_binop_operands(val1, val2, dtype): (source)

Helper to create "interesting" operands to cover common code paths: * scalar inputs * only first "values" is an array (e.g. scalar division fast-paths) * Longer array (SIMD) placing the value of interest at different positions * Oddly strided arrays which may not be SIMD compatible

It does not attempt to cover unaligned access or mixed dtypes. These are normally handled by the casting/buffering machinery.

This is not a fixture (currently), since I believe a fixture normally only yields once?

def on_powerpc(): (source)

True if we are running on a Power PC platform.

@pytest.mark.parametrize('x1', [np.arange(3.0), [0.0, 1.0, 2.0]])
def test_bad_legacy_gufunc_silent_errors(x1): (source)

Undocumented

def test_bad_legacy_ufunc_silent_errors(): (source)

Undocumented

def test_complex_nan_comparisons(): (source)

Undocumented

def test_copysign(): (source)

Undocumented

@pytest.mark.parametrize('ftype', [np.float32, np.float64])
def test_memoverlap_accumulate(ftype): (source)

Undocumented

@pytest.mark.parametrize('ufunc, dtype', [(ufunc, t[0]) for ufunc in UFUNCS_BINARY_ACC for t in ufunc.types if t[-1]...
def test_memoverlap_accumulate_cmp(ufunc, dtype): (source)

Undocumented

@pytest.mark.parametrize('ufunc, dtype', [(ufunc, t[0]) for ufunc in UFUNCS_BINARY_ACC for t in ufunc.types if t[0]...
def test_memoverlap_accumulate_symmetric(ufunc, dtype): (source)

Undocumented

def test_nextafter(): (source)

Undocumented

def test_nextafter_0(): (source)

Undocumented

def test_nextafter_vs_spacing(): (source)

Undocumented

def test_nextafterf(): (source)

Undocumented

@pytest.mark.skipif((np.finfo(np.double) == np.finfo(np.longdouble)), reason='long double is same as double')
@pytest.mark.xfail(condition=platform.machine().startswith('ppc64'), reason='IBM double double')
def test_nextafterl(): (source)

Undocumented

def test_outer_bad_subclass(): (source)

Undocumented

def test_outer_exceeds_maxdims(): (source)

Undocumented

@pytest.mark.parametrize('arr', [np.arange(2), np.matrix([0, 1]), np.matrix([[0, 1], [2, 5]])])
def test_outer_subclass_preserve(arr): (source)

Undocumented

def test_pos_nan(): (source)

Check np.nan is a positive nan.

def test_reduceat(): (source)

Test bug in reduceat when structured arrays are not copied.

def test_reduceat_empty(): (source)

Reduceat should work with empty arrays

def test_rint_big_int(): (source)

Undocumented

def test_signaling_nan_exceptions(): (source)

Undocumented

def test_spacing(): (source)

Undocumented

def test_spacing_gfortran(): (source)

Undocumented

def test_spacingf(): (source)

Undocumented

@pytest.mark.skipif((np.finfo(np.double) == np.finfo(np.longdouble)), reason='long double is same as double')
@pytest.mark.xfail(condition=platform.machine().startswith('ppc64'), reason='IBM double double')
def test_spacingl(): (source)

Undocumented

Undocumented

Value
[obj for obj in np.core.umath.__dict__.values() if isinstance(obj, np.ufunc)]
UFUNCS_BINARY = (source)

Undocumented

Value
[uf for uf in UFUNCS if uf.nin == 2]
UFUNCS_BINARY_ACC = (source)

Undocumented

Value
[uf for uf in UFUNCS_BINARY if hasattr(uf, 'accumulate') and uf.nout == 1]
UFUNCS_UNARY = (source)

Undocumented

Value
[uf for uf in UFUNCS if uf.nin == 1]
UFUNCS_UNARY_FP = (source)

Undocumented

Value
[uf for uf in UFUNCS_UNARY if 'f->f' in uf.types]
avx_ufuncs: dict[str, list] = (source)

Undocumented

def _check_branch_cut(f, x0, dx, re_sign=1, im_sign=-1, sig_zero_ok=False, dtype=complex): (source)

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:funcFunction to check
x0:array-likePoint on branch cut
dx:array-likeDirection to check continuity in
re_sign:{1, -1}Change of sign of the real or imaginary part expected
im_sign:{1, -1}Change of sign of the real or imaginary part expected
sig_zero_ok:boolWhether to check if the branch cut respects signed zero (if applicable)
dtype:dtypeDtype to check (should be complex)
def _signs(dt): (source)

Undocumented

def _test_nextafter(t): (source)

Undocumented

def _test_spacing(t): (source)

Undocumented