Esempio n. 1
0
    def testSin(self):
        pda = ak.linspace(1,10,10)
        result = ak.sin(pda) 

        self.assertIsInstance(result, ak.pdarray)
        self.assertEqual(10, len(result))
        self.assertEqual(float, result.dtype)
        
        with self.assertRaises(TypeError) as cm:
            ak.sin([range(0,10)])
        self.assertEqual('type of argument "pda" must be arkouda.pdarrayclass.pdarray; got list instead', 
                        cm.exception.args[0]) 
Esempio n. 2
0
 def testSin(self):
     na = np.linspace(1,10,10)
     pda = ak.array(na)
 
     self.assertTrue((np.sin(na) == ak.sin(pda).to_ndarray()).all())
     with self.assertRaises(TypeError) as cm:
         ak.cos([range(0,10)])
     self.assertEqual('type of argument "pda" must be arkouda.pdarrayclass.pdarray; got list instead', 
                     cm.exception.args[0])