test_umath

Module Contents

on_powerpc()

True if we are running on a Power PC platform.

class _FilterInvalids

Bases:object

setUp(self)
tearDown(self)
class TestConstants

Bases:TestCase

test_pi(self)
test_e(self)
test_euler_gamma(self)
class TestOut

Bases:TestCase

test_out_subok(self)
class TestDivision

Bases:TestCase

test_division_int(self)
test_division_complex(self)
test_zero_division_complex(self)
test_floor_division_complex(self)
class TestPower

Bases:TestCase

test_power_float(self)
test_power_complex(self)
test_power_zero(self)
test_fast_power(self)
class TestLog2

Bases:TestCase

test_log2_values(self)
test_log2_ints(self)
test_log2_special(self)
class TestExp2

Bases:TestCase

test_exp2_values(self)
class TestLogAddExp2

Bases:test_umath._FilterInvalids

test_logaddexp2_values(self)
test_logaddexp2_range(self)
test_inf(self)
test_nan(self)
class TestLog

Bases:TestCase

test_log_values(self)
class TestExp

Bases:TestCase

test_exp_values(self)
class TestLogAddExp

Bases:test_umath._FilterInvalids

test_logaddexp_values(self)
test_logaddexp_range(self)
test_inf(self)
test_nan(self)
class TestLog1p

Bases:TestCase

test_log1p(self)
test_special(self)
class TestExpm1

Bases:TestCase

test_expm1(self)
test_special(self)
class TestHypot

Bases:TestCase, object

test_simple(self)
assert_hypot_isnan(x, y)
assert_hypot_isinf(x, y)
class TestHypotSpecialValues

Bases:TestCase

test_nan_outputs(self)
test_nan_outputs2(self)
test_no_fpe(self)
assert_arctan2_isnan(x, y)
assert_arctan2_ispinf(x, y)
assert_arctan2_isninf(x, y)
assert_arctan2_ispzero(x, y)
assert_arctan2_isnzero(x, y)
class TestArctan2SpecialValues

Bases:TestCase

test_one_one(self)
test_zero_nzero(self)
test_zero_pzero(self)
test_zero_negative(self)
test_zero_positive(self)
test_positive_zero(self)
test_negative_zero(self)
test_any_ninf(self)
test_any_pinf(self)
test_inf_any(self)
test_inf_ninf(self)
test_inf_pinf(self)
test_nan_any(self)
class TestLdexp

Bases:TestCase

_check_ldexp(self, tp)
test_ldexp(self)
test_ldexp_overflow(self)
class TestMaximum

Bases:test_umath._FilterInvalids

test_reduce(self)
test_reduce_complex(self)
test_float_nans(self)
test_complex_nans(self)
test_object_array(self)
class TestMinimum

Bases:test_umath._FilterInvalids

test_reduce(self)
test_reduce_complex(self)
test_float_nans(self)
test_complex_nans(self)
test_object_array(self)
class TestFmax

Bases:test_umath._FilterInvalids

test_reduce(self)
test_reduce_complex(self)
test_float_nans(self)
test_complex_nans(self)
class TestFmin

Bases:test_umath._FilterInvalids

test_reduce(self)
test_reduce_complex(self)
test_float_nans(self)
test_complex_nans(self)
class TestBool

Bases:TestCase

test_truth_table(self)
class TestFloatingPoint

Bases:TestCase

test_floating_point(self)
class TestDegrees

Bases:TestCase

test_degrees(self)
class TestRadians

Bases:TestCase

test_radians(self)
class TestSign

Bases:TestCase

test_sign(self)
class TestMinMax

Bases:TestCase

test_minmax_blocked(self)
test_lower_align(self)
class TestAbsoluteNegative

Bases:TestCase

test_abs_neg_blocked(self)
test_lower_align(self)
class TestSpecialMethods

Bases:TestCase

test_wrap(self)
test_wrap_with_iterable(self)
test_priority_with_scalar(self)
test_old_wrap(self)
test_priority(self)
test_failing_wrap(self)
test_default_prepare(self)
test_prepare(self)
test_failing_prepare(self)
test_array_with_context(self)
test_ufunc_override(self)
test_ufunc_override_mro(self)
test_ufunc_override_methods(self)
test_ufunc_override_out(self)
test_ufunc_override_exception(self)
class TestChoose

Bases:TestCase

test_mixed(self)
is_longdouble_finfo_bogus()
class TestComplexFunctions

Bases:object

funcs
test_it(self)
test_precisions_consistent(self)
test_branch_cuts(self)
test_branch_cuts_failing(self)
test_against_cmath(self)
check_loss_of_precision(self, dtype)

Check loss of precision in complex arc* functions

test_loss_of_precision(self)
test_loss_of_precision_longcomplex(self)
class TestAttributes

Bases:TestCase

test_attributes(self)
class TestSubclass

Bases:TestCase

test_subclass_op(self)
_check_branch_cut(f, x0, dx, re_sign=1, im_sign=-1, sig_zero_ok=False, dtype=np.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.

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)
test_copysign()
_test_nextafter(t)
test_nextafter()
test_nextafterf()
test_nextafterl()
_test_spacing(t)
test_spacing()
test_spacingf()
test_spacingl()
test_spacing_gfortran()
test_nextafter_vs_spacing()
test_pos_nan()

Check np.nan is a positive nan.

test_reduceat()

Test bug in reduceat when structured arrays are not copied.

test_reduceat_empty()

Reduceat should work with empty arrays

test_complex_nan_comparisons()