Python cmath.log10() Examples

The following are 4 code examples of cmath.log10(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module cmath , or try the search function .
Example #1
Source File: math_functions.py    From jhTAlib with GNU General Public License v3.0 5 votes vote down vote up
def LOG10(df, price='Close'):
    """
    Base-10 Logarithm
    Returns: list of floats = jhta.LOG10(df, price='Close')
    """
    return [cmath.log10(df[price][i]).real for i in range(len(df[price]))] 
Example #2
Source File: test_cmath_jy.py    From medicare-demo with Apache License 2.0 5 votes vote down vote up
def test_log10(self):
        self.assertAlmostEqual(complex(0.69897, 0.40272),
                               cmath.log10(complex(3, 4))) 
Example #3
Source File: test_cmath_jy.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
def test_log10(self):
        self.assertAlmostEqual(complex(0.69897, 0.40272),
                               cmath.log10(complex(3, 4))) 
Example #4
Source File: test_cmath_jy.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
def test_log10(self):
        self.assertAlmostEqual(complex(0.69897, 0.40272),
                               cmath.log10(complex(3, 4)))