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)
def test_rad2deg(): unary_ufunc_check(lambda x: np.rad2deg(x) / 50.0, test_complex=False)
def test_real_ic(): unary_ufunc_check(np.real_if_close) def test_imag(): unary_ufunc_check(np.imag)
def test_square(): unary_ufunc_check(np.square, test_complex=False) def test_tan(): unary_ufunc_check(np.tan, lims=[-1.1, 1.1])
def test_radians(): unary_ufunc_check(np.radians, test_complex=False) def test_sign(): unary_ufunc_check(np.sign)
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])
def test_exp2(): unary_ufunc_check(np.exp2) def test_expm1(): unary_ufunc_check(np.expm1)
def test_cos(): unary_ufunc_check(np.cos) def test_cosh(): unary_ufunc_check(np.cosh)
def test_real_ic(): unary_ufunc_check(np.real_if_close)
def test_real(): unary_ufunc_check(np.real)
def test_tanh(): unary_ufunc_check(np.tanh)
def test_tan(): unary_ufunc_check(np.tan, lims=[-1.1, 1.1])
def test_square(): unary_ufunc_check(np.square, test_complex=False)
def test_sqrt(): unary_ufunc_check(np.sqrt, lims=[1.0, 3.0])
def test_radians(): unary_ufunc_check(np.radians, test_complex=False)
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])
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)
def test_imag(): unary_ufunc_check(np.imag)
def test_degrees(): unary_ufunc_check(lambda x : np.degrees(x)/50.0, test_complex=False) def test_exp(): unary_ufunc_check(np.exp)
def test_conj(): unary_ufunc_check(np.conj)
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)
def test_angle(): unary_ufunc_check(np.angle)
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)
def test_sin(): unary_ufunc_check(np.sin)
def test_sinh(): unary_ufunc_check(np.sinh) def test_sqrt(): unary_ufunc_check(np.sqrt, lims=[1.0, 3.0])
def test_absolute(): unary_ufunc_check(np.absolute, lims=[0.1, 4.0])
def test_tanh(): unary_ufunc_check(np.tanh) def test_real(): unary_ufunc_check(np.real)
def test_arccosh(): unary_ufunc_check(np.arccosh, lims=[1.1, 4.0])
def test_conj(): unary_ufunc_check(np.conj) def test_angle(): unary_ufunc_check(np.angle)
def test_arctanh(): unary_ufunc_check(np.arctanh, lims=[-0.9, 0.9])
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])
def test_ceil(): unary_ufunc_check(np.ceil, lims=[-1.5, 1.5], test_complex=False)
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])
def test_cosh(): unary_ufunc_check(np.cosh)
def test_ceil(): unary_ufunc_check(np.ceil, lims=[-1.5, 1.5], test_complex=False) def test_cos(): unary_ufunc_check(np.cos)
def test_deg2rad(): unary_ufunc_check(np.deg2rad, test_complex=False)
def test_cosh(): unary_ufunc_check(np.cosh) def test_deg2rad(): unary_ufunc_check(np.deg2rad, test_complex=False)
def test_degrees(): unary_ufunc_check(lambda x: np.degrees(x) / 50.0, test_complex=False)
def test_exp(): unary_ufunc_check(np.exp) def test_exp2(): unary_ufunc_check(np.exp2)
def test_exp(): unary_ufunc_check(np.exp)
def test_expm1(): unary_ufunc_check(np.expm1) def test_fabs(): unary_ufunc_check(np.fabs, test_complex=False)
def test_psi(): unary_ufunc_check(special.psi, lims=[0.3, 2.0], test_complex=False)
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])
def test_gammasgn(): unary_ufunc_check(special.gammasgn, lims=[0.3, 2.0], test_complex=False)
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])
def test_rgamma(): unary_ufunc_check(special.rgamma, lims=[0.3, 2.0], test_complex=False)
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)
def test_i1(): unary_ufunc_check(special.i1, lims=[0.2, 20.0], test_complex=False)
def test_sin(): unary_ufunc_check(np.sin) def test_sinh(): unary_ufunc_check(np.sinh)
def test_erfc(): unary_ufunc_check(special.erfc, lims=[-3., 3.], test_complex=True)
def test_sqrt(): unary_ufunc_check(np.sqrt, lims=[1.0, 3.0]) def test_square(): unary_ufunc_check(np.square, test_complex=False)
def test_erfinv(): unary_ufunc_check(special.erfinv, lims=[-0.95, 0.95], test_complex=False)
def test_tan(): unary_ufunc_check(np.tan, lims=[-1.1, 1.1]) def test_tanh(): unary_ufunc_check(np.tanh)
def test_erfcinv(): unary_ufunc_check(special.erfcinv, lims=[0.05, 1.95], test_complex=False)
def test_real(): unary_ufunc_check(np.real) def test_real_ic(): unary_ufunc_check(np.real_if_close)
def test_logit(): unary_ufunc_check(special.logit, lims=[0.10, 0.90], test_complex=False)
def test_imag(): unary_ufunc_check(np.imag) def test_conj(): unary_ufunc_check(np.conj)
def test_expit(): unary_ufunc_check(special.expit, lims=[-4.05, 4.95], test_complex=False)
def test_angle(): unary_ufunc_check(np.angle) # Binary ufunc tests def test_add(): binary_ufunc_check(np.add)
def test_sin(): unary_ufunc_check(np.sin) def test_abs(): unary_ufunc_check(np.abs, lims=[0.1, 4.0])