Example #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)
Example #2
0
def test_rad2deg():
    unary_ufunc_check(lambda x: np.rad2deg(x) / 50.0, test_complex=False)
Example #3
0
def test_real_ic(): unary_ufunc_check(np.real_if_close)
def test_imag():    unary_ufunc_check(np.imag)
Example #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])
Example #5
0
def test_radians(): unary_ufunc_check(np.radians, test_complex=False)
def test_sign():    unary_ufunc_check(np.sign)
Example #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])
Example #7
0
def test_exp2():    unary_ufunc_check(np.exp2)
def test_expm1():   unary_ufunc_check(np.expm1)
Example #8
0
def test_cos():     unary_ufunc_check(np.cos)
def test_cosh():    unary_ufunc_check(np.cosh)
Example #9
0
def test_real_ic():
    unary_ufunc_check(np.real_if_close)
Example #10
0
def test_real():
    unary_ufunc_check(np.real)
Example #11
0
def test_tanh():
    unary_ufunc_check(np.tanh)
Example #12
0
def test_tan():
    unary_ufunc_check(np.tan, lims=[-1.1, 1.1])
Example #13
0
def test_square():
    unary_ufunc_check(np.square, test_complex=False)
Example #14
0
def test_sqrt():
    unary_ufunc_check(np.sqrt, lims=[1.0, 3.0])
Example #15
0
def test_radians():
    unary_ufunc_check(np.radians, test_complex=False)
Example #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])
Example #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)
Example #18
0
def test_imag():
    unary_ufunc_check(np.imag)
Example #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)
Example #20
0
def test_conj():
    unary_ufunc_check(np.conj)
Example #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)
Example #22
0
def test_angle():
    unary_ufunc_check(np.angle)
Example #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)
Example #24
0
def test_sin():
    unary_ufunc_check(np.sin)
Example #25
0
def test_sinh():    unary_ufunc_check(np.sinh)
def test_sqrt():    unary_ufunc_check(np.sqrt, lims=[1.0, 3.0])
Example #26
0
def test_absolute():
    unary_ufunc_check(np.absolute, lims=[0.1, 4.0])
Example #27
0
def test_tanh():    unary_ufunc_check(np.tanh)
def test_real():    unary_ufunc_check(np.real)
Example #28
0
def test_arccosh():
    unary_ufunc_check(np.arccosh, lims=[1.1, 4.0])
Example #29
0
def test_conj():    unary_ufunc_check(np.conj)
def test_angle():   unary_ufunc_check(np.angle)
Example #30
0
def test_arctanh():
    unary_ufunc_check(np.arctanh, lims=[-0.9, 0.9])
Example #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])
Example #32
0
def test_ceil():
    unary_ufunc_check(np.ceil, lims=[-1.5, 1.5], test_complex=False)
Example #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])
Example #34
0
def test_cosh():
    unary_ufunc_check(np.cosh)
Example #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)
Example #36
0
def test_deg2rad():
    unary_ufunc_check(np.deg2rad, test_complex=False)
Example #37
0
def test_cosh():    unary_ufunc_check(np.cosh)
def test_deg2rad(): unary_ufunc_check(np.deg2rad, test_complex=False)
Example #38
0
def test_degrees():
    unary_ufunc_check(lambda x: np.degrees(x) / 50.0, test_complex=False)
Example #39
0
def test_exp():     unary_ufunc_check(np.exp)
def test_exp2():    unary_ufunc_check(np.exp2)
Example #40
0
def test_exp():
    unary_ufunc_check(np.exp)
Example #41
0
def test_expm1():   unary_ufunc_check(np.expm1)
def test_fabs():    unary_ufunc_check(np.fabs, test_complex=False)
Example #42
0
 def test_psi():
     unary_ufunc_check(special.psi, lims=[0.3, 2.0], test_complex=False)
Example #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])
Example #44
0
 def test_gammasgn():
     unary_ufunc_check(special.gammasgn,
                       lims=[0.3, 2.0],
                       test_complex=False)
Example #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])
Example #46
0
 def test_rgamma():
     unary_ufunc_check(special.rgamma, lims=[0.3, 2.0], test_complex=False)
Example #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)
Example #48
0
 def test_i1():
     unary_ufunc_check(special.i1, lims=[0.2, 20.0], test_complex=False)
Example #49
0
def test_sin():     unary_ufunc_check(np.sin)
def test_sinh():    unary_ufunc_check(np.sinh)
Example #50
0
 def test_erfc():
     unary_ufunc_check(special.erfc, lims=[-3., 3.], test_complex=True)
Example #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)
Example #52
0
 def test_erfinv():
     unary_ufunc_check(special.erfinv,
                       lims=[-0.95, 0.95],
                       test_complex=False)
Example #53
0
def test_tan():     unary_ufunc_check(np.tan, lims=[-1.1, 1.1])
def test_tanh():    unary_ufunc_check(np.tanh)
Example #54
0
 def test_erfcinv():
     unary_ufunc_check(special.erfcinv,
                       lims=[0.05, 1.95],
                       test_complex=False)
Example #55
0
def test_real():    unary_ufunc_check(np.real)
def test_real_ic(): unary_ufunc_check(np.real_if_close)
Example #56
0
 def test_logit():
     unary_ufunc_check(special.logit, lims=[0.10, 0.90], test_complex=False)
Example #57
0
def test_imag():    unary_ufunc_check(np.imag)
def test_conj():    unary_ufunc_check(np.conj)
Example #58
0
 def test_expit():
     unary_ufunc_check(special.expit,
                       lims=[-4.05, 4.95],
                       test_complex=False)
Example #59
0
def test_angle():   unary_ufunc_check(np.angle)

# Binary ufunc tests

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