def testNumpyAverageMixTypesValueArray(self): npsy = NumpySciPy() multiArray = [[0.01,1],[0.01,1]] actual = npsy.numpyAverage(multiArray) expected = 0.505 self.assertEqual(expected,actual)
def testNumpyAverageOneValueArray(self): npsy = NumpySciPy() multiArray = [[1,2],[1,2]] actual = npsy.numpyAverage(multiArray) expected = 1.5 self.assertEqual(expected,actual)
def testNumpyAverageEmptyArray(self): npsy = NumpySciPy() emptyArray = [] isNaN = np.isnan(npsy.numpyAverage(emptyArray)) self.assertTrue(isNaN)
def testNumpyAveragetwoValueArray(self): npsy = NumpySciPy() emptyArray = [[1,2]] actual = npsy.numpyAverage(emptyArray) expected = 1.5 self.assertEqual(expected,actual)
def testNumpyAverageOneOffValueArray(self): npsy = NumpySciPy() multiArray = [[0.01,1],[1,4]] actual = npsy.numpyAverage(multiArray) expected = 1.5025 self.assertEqual(expected,actual)