code: def testMatrixRealAggregation(self):
      p = Pool()
      p.add("foo", [1.1, 2.2, 3.3])
      p.add("foo", [4.4, 5.5, 6.6])
      p.add("foo", [7.7, 8.8, 9.9])
  
      defaultStats = [
          "mean",
          "min",
          "max",
          "median",
          "var",
          "stdev",
          "dmean",
          "dvar",
          "dmean2",
          "dvar2",
          "skew",
          "kurt",
      ]
      results = PoolAggregator(defaultStats=defaultStats)(p)
  
      self.assertAlmostEqualVector(results["foo.mean"], [4.4, 5.5, 6.6])
      self.assertAlmostEqualVector(
          results["foo.median"], [4.4, 5.5, 6.6]
      )
      self.assertAlmostEqualVector(results["foo.min"], [1.1, 2.2, 3.3])
      self.assertAlmostEqualVector(results["foo.max"], [7.7, 8.8, 9.9])
      self.assertAlmostEqualVector(results["foo.var"], [7.26] * 3)
      self.assertAlmostEqualVector(
          results["foo.stdev"], [2.694438717061496] * 3
      )
      self.assertAlmostEqualVector(results["foo.dmean"], [3.3] * 3)
      self.assertAlmostEqualVector(results["foo.dvar"], [0] * 3)
      self.assertAlmostEqualVector(
          results["foo.dmean2"], [0] * 3, precision=1e-6
      )
      self.assertAlmostEqualVector(
          results["foo.dvar2"], [0] * 3, precision=1e-6
      )
      self.assertAlmostEqualVector(
          results["foo.kurt"], [-1.5, -1.5, -1.5], precision=1e-6
      )
      self.assertAlmostEqualVector(
          results["foo.skew"], [0.0, 0.0, 0.0], precision=1e-6
      )
  
      # test median for even number of frames
      p.add("foo", [10.0, 10.0, 10.0])
      results = PoolAggregator(defaultStats=defaultStats)(p)
      self.assertAlmostEqualVector(
          results["foo.median"], [6.05, 7.15, 8.25]
      )
  
      # test cov and icov
      p = Pool(
          {
              "foo": [
                  [32.3, 43.21, 4.3],
                  [44.0, 5.12, 3.21],
                  [45.12, 415.0, 89.4],
                  [112.15, 45.0, 1.0023],
              ]
          }
      )
  
      results = PoolAggregator(defaultStats=["cov", "icov"])(p)
  
      self.assertAlmostEqualMatrix(
          results["foo.cov"],
          [
              [1317.99694824, -1430.0489502, -430.359405518],
              [-1430.0489502, 37181.1601563, 8301.80175781],
              [-430.359405518, 8301.80175781, 1875.15136719],
          ],
          precision=1e-4,
      )
  
      self.assertAlmostEqualMatrix(
          results["foo.icov"],
          [
              [0.00144919625018, -0.00161361286882, 0.0074764424935],
              [-0.00161361729261, 0.00413948250934, -0.018696943298],
              [0.00747651979327, -0.0186969414353, 0.0850256085396],
          ],
          precision=1e-4,
      )
  
file_path: essentia/test/src/unittests/stats/test_poolaggregator.py
imports: from essentia_test import *
label_desc: Use image node_id 4 for calling the TestPoolAggregator obj's underlying member method code with example usage: obj.testMatrixRealAggregation() without return types