Ejemplo n.º 1
0
    def testLog(self):
        na = np.linspace(1,10,10)
        pda = ak.array(na)

        self.assertTrue((np.log(na) == ak.log(pda).to_ndarray()).all())
        with self.assertRaises(TypeError) as cm:
            ak.log([range(0,10)])
        self.assertEqual('type of argument "pda" must be arkouda.pdarrayclass.pdarray; got list instead', 
                        cm.exception.args[0])  
Ejemplo n.º 2
0
    def testLog(self):
        pda = ak.linspace(1,10,10)
        result = ak.log(pda) 

        self.assertIsInstance(result, ak.pdarray)
        self.assertEqual(10, len(result))
        self.assertEqual(float, result.dtype)
        
        with self.assertRaises(TypeError) as cm:
            ak.log([range(0,10)])
        self.assertEqual('type of argument "pda" must be arkouda.pdarrayclass.pdarray; got list instead', 
                        cm.exception.args[0])