Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/c/m/cmonkey-python-HEAD/cmonkey/datamatrix.py   cmonkey-python(Download)
    def mean(self):
        """returns the mean value"""
        return util.mean(self.values)
 
    def row_variance(self):
        d_rows = util.row_means(self.values)
        d_cols = util.column_means(self.values)
        d_all = util.mean(d_rows)
        tmp = self.values + d_all - util.r_outer(d_rows, d_cols, operator.add)
        average = util.mean(np.abs(tmp))

src/c/m/cmonkey-python-HEAD/test/util_test.py   cmonkey-python(Download)
    def test_mean_with_nans(self):
        """tests the mean() function"""
        array = np.array([2.0, 3.0, np.nan, 1.0])
        result = util.mean(array)
        self.assertAlmostEqual(2.0, result)