def log(*args, **kw): arg0 = args[0] if isinstance(arg0, (int, float, long)): return _math.log10(*args,**kw) elif isinstance(arg0, complex): return _cmath.log10(*args,**kw) elif isinstance(arg0, _sympy.Basic): return _sympy.log10(*args,**kw) else: return _numpy.log10(*args,**kw)
'cosh': lambda x: sympy.cosh(x), 'sinh': lambda x: sympy.sinh(x), 'tanh': lambda x: sympy.tanh(x), 'exp': lambda x: sympy.exp(x), 'acos': lambda x: sympy.acos(x), 'asin': lambda x: sympy.asin(x), 'atan': lambda x: sympy.atan(x), 'acosh': lambda x: sympy.acosh(x), 'asinh': lambda x: sympy.asinh(x), 'atanh': lambda x: sympy.atanh(x), 'abs': lambda x: abs(x), 'mod': lambda x, y: sympy.Mod(x, y), 'erf': lambda x: sympy.erf(x), 'erfc': lambda x: sympy.erfc(x), 'logm': lambda x: sympy.log(abs(x)), 'logm10': lambda x: sympy.log10(abs(x)), 'logm2': lambda x: sympy.log2(abs(x)), 'log1p': lambda x: sympy.log(x + 1), 'floor': lambda x: sympy.floor(x), 'ceil': lambda x: sympy.ceil(x), 'sign': lambda x: sympy.sign(x), 'round': lambda x: sympy.round(x), } def pysr(X=None, y=None, weights=None, binary_operators=["plus", "mult"], unary_operators=["cos", "exp", "sin"], procs=4,
'cosh': lambda x: sympy.cosh(x), 'sinh': lambda x: sympy.sinh(x), 'tanh': lambda x: sympy.tanh(x), 'exp': lambda x: sympy.exp(x), 'acos': lambda x: sympy.acos(x), 'asin': lambda x: sympy.asin(x), 'atan': lambda x: sympy.atan(x), 'acosh': lambda x: sympy.acosh(x), 'asinh': lambda x: sympy.asinh(x), 'atanh': lambda x: sympy.atanh(x), 'abs': lambda x: sympy.Abs(x), 'mod': lambda x, y: sympy.Mod(x, y), 'erf': lambda x: sympy.erf(x), 'erfc': lambda x: sympy.erfc(x), 'logm': lambda x: sympy.log(sympy.Abs(x)), 'logm10': lambda x: sympy.log10(sympy.Abs(x)), 'logm2': lambda x: sympy.log2(sympy.Abs(x)), 'log1p': lambda x: sympy.log(x + 1), 'floor': lambda x: sympy.floor(x), 'ceil': lambda x: sympy.ceil(x), 'sign': lambda x: sympy.sign(x), 'round': lambda x: sympy.round(x), } def pysr( X=None, y=None, weights=None, procs=4, populations=None,