Esempio n. 1
0
 def testStandard (self):
     "Test sqrt, log, log10, exp"
     assert eq (MA.exp(1.0), MA.e)
     assert eq (MA.sqrt(self.a), map(math.sqrt, self.a))
     assert eq (MA.log(self.a), map(math.log, self.a))
     assert eq (MA.log10(self.a), map(math.log10, self.a))
     assert eq (MA.exp(self.a), map(math.exp, self.a))
     assert eq (MA.sqrt(self.m).flat, map(math.sqrt, self.m.flat))
     assert eq (MA.log(self.m).flat, map(math.log, self.m.flat))
     assert eq (MA.log10(self.m).flat, map(math.log10, self.m.flat))
     assert eq (MA.exp(self.m).flat, map(math.exp, self.m.flat))