Example #1
0
    def testExp(self):
        na = np.linspace(1,10,10)
        pda = ak.array(na)

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

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