Пример #1
0
def test_ldexp_neg():   unary_ufunc_check(lambda x: np.ldexp(x, -2), test_complex=False)
# Re-add these tests once we switch to new refactoring that gets rid of NoDerivativeNode
# def test_frexp():       unary_ufunc_check(lambda x: np.frexp(x)[0], lims=[2.1, 2.9], test_complex=False)
# def test_frexp_neg():   unary_ufunc_check(lambda x: np.frexp(x)[0], lims=[-2.1, -2.9], test_complex=False)

# Binary ufunc tests
def test_add():             binary_ufunc_check(np.add)
Пример #2
0
def test_rad2deg():
    unary_ufunc_check(lambda x: np.rad2deg(x) / 50.0, test_complex=False)
Пример #3
0
def test_real_ic(): unary_ufunc_check(np.real_if_close)
def test_imag():    unary_ufunc_check(np.imag)
Пример #4
0
def test_square():  unary_ufunc_check(np.square, test_complex=False)
def test_tan():     unary_ufunc_check(np.tan, lims=[-1.1, 1.1])
Пример #5
0
def test_radians(): unary_ufunc_check(np.radians, test_complex=False)
def test_sign():    unary_ufunc_check(np.sign)
Пример #6
0
def test_log():     unary_ufunc_check(np.log,   lims=[0.2, 2.0])
def test_log10():   unary_ufunc_check(np.log10, lims=[0.2, 2.0])
Пример #7
0
def test_exp2():    unary_ufunc_check(np.exp2)
def test_expm1():   unary_ufunc_check(np.expm1)
Пример #8
0
def test_cos():     unary_ufunc_check(np.cos)
def test_cosh():    unary_ufunc_check(np.cosh)
Пример #9
0
def test_real_ic():
    unary_ufunc_check(np.real_if_close)
Пример #10
0
def test_real():
    unary_ufunc_check(np.real)
Пример #11
0
def test_tanh():
    unary_ufunc_check(np.tanh)
Пример #12
0
def test_tan():
    unary_ufunc_check(np.tan, lims=[-1.1, 1.1])
Пример #13
0
def test_square():
    unary_ufunc_check(np.square, test_complex=False)
Пример #14
0
def test_sqrt():
    unary_ufunc_check(np.sqrt, lims=[1.0, 3.0])
Пример #15
0
def test_radians():
    unary_ufunc_check(np.radians, test_complex=False)
Пример #16
0
def test_arccosh(): unary_ufunc_check(np.arccosh, lims=[1.1, 4.0])
def test_arcsinh(): unary_ufunc_check(np.arcsinh, lims=[-0.9, 0.9])
Пример #17
0
def test_arctanh(): unary_ufunc_check(np.arctanh, lims=[-0.9, 0.9])
def test_ceil():    unary_ufunc_check(np.ceil, lims=[-1.5, 1.5], test_complex=False)
Пример #18
0
def test_imag():
    unary_ufunc_check(np.imag)
Пример #19
0
def test_degrees(): unary_ufunc_check(lambda x : np.degrees(x)/50.0, test_complex=False)
def test_exp():     unary_ufunc_check(np.exp)
Пример #20
0
def test_conj():
    unary_ufunc_check(np.conj)
Пример #21
0
def test_fabs():    unary_ufunc_check(np.fabs, test_complex=False)
def test_floor():   unary_ufunc_check(np.floor, lims=[-1.5, 1.5], test_complex=False)
Пример #22
0
def test_angle():
    unary_ufunc_check(np.angle)
Пример #23
0
def test_log2():    unary_ufunc_check(np.log2,  lims=[0.2, 2.0])
def test_rad2deg(): unary_ufunc_check(lambda x : np.rad2deg(x)/50.0, test_complex=False)
Пример #24
0
def test_sin():
    unary_ufunc_check(np.sin)
Пример #25
0
def test_sinh():    unary_ufunc_check(np.sinh)
def test_sqrt():    unary_ufunc_check(np.sqrt, lims=[1.0, 3.0])
Пример #26
0
def test_absolute():
    unary_ufunc_check(np.absolute, lims=[0.1, 4.0])
Пример #27
0
def test_tanh():    unary_ufunc_check(np.tanh)
def test_real():    unary_ufunc_check(np.real)
Пример #28
0
def test_arccosh():
    unary_ufunc_check(np.arccosh, lims=[1.1, 4.0])
Пример #29
0
def test_conj():    unary_ufunc_check(np.conj)
def test_angle():   unary_ufunc_check(np.angle)
Пример #30
0
def test_arctanh():
    unary_ufunc_check(np.arctanh, lims=[-0.9, 0.9])
Пример #31
0
def test_absolute():unary_ufunc_check(np.absolute, lims=[0.1, 4.0])
def test_arccosh(): unary_ufunc_check(np.arccosh, lims=[1.1, 4.0])
Пример #32
0
def test_ceil():
    unary_ufunc_check(np.ceil, lims=[-1.5, 1.5], test_complex=False)
Пример #33
0
def test_arcsinh(): unary_ufunc_check(np.arcsinh, lims=[-0.9, 0.9])
def test_arctanh(): unary_ufunc_check(np.arctanh, lims=[-0.9, 0.9])
Пример #34
0
def test_cosh():
    unary_ufunc_check(np.cosh)
Пример #35
0
def test_ceil():    unary_ufunc_check(np.ceil, lims=[-1.5, 1.5], test_complex=False)
def test_cos():     unary_ufunc_check(np.cos)
Пример #36
0
def test_deg2rad():
    unary_ufunc_check(np.deg2rad, test_complex=False)
Пример #37
0
def test_cosh():    unary_ufunc_check(np.cosh)
def test_deg2rad(): unary_ufunc_check(np.deg2rad, test_complex=False)
Пример #38
0
def test_degrees():
    unary_ufunc_check(lambda x: np.degrees(x) / 50.0, test_complex=False)
Пример #39
0
def test_exp():     unary_ufunc_check(np.exp)
def test_exp2():    unary_ufunc_check(np.exp2)
Пример #40
0
def test_exp():
    unary_ufunc_check(np.exp)
Пример #41
0
def test_expm1():   unary_ufunc_check(np.expm1)
def test_fabs():    unary_ufunc_check(np.fabs, test_complex=False)
Пример #42
0
 def test_psi():
     unary_ufunc_check(special.psi, lims=[0.3, 2.0], test_complex=False)
Пример #43
0
def test_floor():   unary_ufunc_check(np.floor, lims=[-1.5, 1.5], test_complex=False)
def test_log():     unary_ufunc_check(np.log,   lims=[0.2, 2.0])
Пример #44
0
 def test_gammasgn():
     unary_ufunc_check(special.gammasgn,
                       lims=[0.3, 2.0],
                       test_complex=False)
Пример #45
0
def test_log1p():   unary_ufunc_check(np.log1p, lims=[0.2, 2.0])
def test_log2():    unary_ufunc_check(np.log2,  lims=[0.2, 2.0])
Пример #46
0
 def test_rgamma():
     unary_ufunc_check(special.rgamma, lims=[0.3, 2.0], test_complex=False)
Пример #47
0
def test_rad2deg(): unary_ufunc_check(lambda x : np.rad2deg(x)/50.0, test_complex=False)
def test_radians(): unary_ufunc_check(np.radians, test_complex=False)
Пример #48
0
 def test_i1():
     unary_ufunc_check(special.i1, lims=[0.2, 20.0], test_complex=False)
Пример #49
0
def test_sin():     unary_ufunc_check(np.sin)
def test_sinh():    unary_ufunc_check(np.sinh)
Пример #50
0
 def test_erfc():
     unary_ufunc_check(special.erfc, lims=[-3., 3.], test_complex=True)
Пример #51
0
def test_sqrt():    unary_ufunc_check(np.sqrt, lims=[1.0, 3.0])
def test_square():  unary_ufunc_check(np.square, test_complex=False)
Пример #52
0
 def test_erfinv():
     unary_ufunc_check(special.erfinv,
                       lims=[-0.95, 0.95],
                       test_complex=False)
Пример #53
0
def test_tan():     unary_ufunc_check(np.tan, lims=[-1.1, 1.1])
def test_tanh():    unary_ufunc_check(np.tanh)
Пример #54
0
 def test_erfcinv():
     unary_ufunc_check(special.erfcinv,
                       lims=[0.05, 1.95],
                       test_complex=False)
Пример #55
0
def test_real():    unary_ufunc_check(np.real)
def test_real_ic(): unary_ufunc_check(np.real_if_close)
Пример #56
0
 def test_logit():
     unary_ufunc_check(special.logit, lims=[0.10, 0.90], test_complex=False)
Пример #57
0
def test_imag():    unary_ufunc_check(np.imag)
def test_conj():    unary_ufunc_check(np.conj)
Пример #58
0
 def test_expit():
     unary_ufunc_check(special.expit,
                       lims=[-4.05, 4.95],
                       test_complex=False)
Пример #59
0
def test_angle():   unary_ufunc_check(np.angle)

# Binary ufunc tests

def test_add(): binary_ufunc_check(np.add)
Пример #60
0
def test_sin():     unary_ufunc_check(np.sin)
def test_abs():     unary_ufunc_check(np.abs, lims=[0.1, 4.0])