6 examples of 'python log10' in Python

Every line of 'python log10' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
92def _log10(x):
93 if isinstance(x, complex) or x < 0:
94 return cmath.log10(x)
95 else:
96 return math.log10(x)

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

431def log10(self):
432 return theano.tensor.log10(self)
85def log10(self, x): pass
84def log10(arg):
85 return _generate_intrinsic_function_expression(arg, 'log10', math.log10)
54def trylog10(value):
55 if (value<EPS):
56 logv = default_value
57 else:
58 logv = np.log10(value)
59 return logv
179@lower(cmath.log10, types.Complex)
180def log10_impl(context, builder, sig, args):
181 LN_10 = 2.302585092994045684
183 def log10_impl(z):
184 """cmath.log10(z)"""
185 z = cmath.log(z)
186 # This formula gives better results on +/-inf than cmath.log(z, 10)
187 # See http://bugs.python.org/issue22544
188 return complex(z.real / LN_10, z.imag / LN_10)
190 res = context.compile_internal(builder, log10_impl, sig, args)
191 return impl_ret_untracked(context, builder, sig, res)

Related snippets