code: def test_highdim_array_metrics(self):
      y_true = np.array(
          [
              [[3, -0.5], [2, 7]],
              [[3, -0.5], [2, 7]],
              [[3, -0.5], [2, 7]],
          ]
      )
      y_pred = np.array(
          [
              [[2.5, -0.3], [2, 8]],
              [[2.5, -0.3], [2, 8]],
              [[2.5, -0.3], [2, 8]],
          ]
      )
  
      # single metric
      # 3-dim
      assert_almost_equal(
          Evaluator.evaluate("smape", y_true, y_pred, aggregate=None)[
              0
          ],
          [[9.09, 25.0], [0.0, 6.67]],
          2,
      )
      assert_almost_equal(
          Evaluator.evaluate("mape", y_true, y_pred, aggregate=None)[0],
          [[16.67 / 100, 40.00 / 100], [0 / 100, 14.29 / 100]],
          2,
      )
      assert_almost_equal(
          Evaluator.evaluate("rmse", y_true, y_pred, aggregate=None)[0],
          [[0.5, 0.2], [0, 1]],
          2,
      )
      assert_almost_equal(
          Evaluator.evaluate("mse", y_true, y_pred, aggregate=None)[0],
          [[0.25, 0.04], [0, 1]],
          2,
      )
  
      # 2-dim
      y_true = np.array([[1, 2], [0.4, 5], [1, 2], [0.4, 5]])
      y_pred = np.array([[2, 1], [0.2, 3], [2, 1], [0.2, 3]])
      assert_almost_equal(
          Evaluator.evaluate("mse", y_true, y_pred, aggregate=None)[0],
          [0.52, 2.5],
          2,
      )
      assert_almost_equal(
          Evaluator.evaluate("smape", y_true, y_pred, aggregate=None)[
              0
          ],
          [33.33, 29.17],
          2,
      )
  
      # multi metrics
      y_true = np.array(
          [
              [[3, -0.5], [2, 7]],
              [[3, -0.5], [2, 7]],
              [[3, -0.5], [2, 7]],
          ]
      )
      y_pred = np.array(
          [
              [[2.5, -0.3], [2, 8]],
              [[2.5, -0.3], [2, 8]],
              [[2.5, -0.3], [2, 8]],
          ]
      )
      mse, rmse, mape, smape = Evaluator.evaluate(
          ["mse", "rmse", "mape", "smape"],
          y_true,
          y_pred,
          aggregate=None,
      )
      assert_almost_equal(mse, [[0.25, 0.04], [0, 1]], 2)
      assert_almost_equal(rmse, [[0.5, 0.2], [0, 1]], 2)
      assert_almost_equal(
          mape, [[16.67 / 100, 40.00 / 100], [0 / 100, 14.29 / 100]], 2
      )
      assert_almost_equal(smape, [[9.09, 25.0], [0.0, 6.67]], 2)
  
file_path: BigDL/python/chronos/test/bigdl/chronos/metric/test_forecast_metrics.py
imports: import numpy
  import pytest
  import time
  from unittest import TestCase
  from numpy.testing import assert_almost_equal
  from numpy.testing import assert_array_almost_equal
  from bigdl.chronos.metric.forecast_metrics import Evaluator
  from ..None import op_torch, op_tf2, op_distributed, op_diff_set_all
label_desc: Use image node_id 4 for calling the TestChronosForecastMetrics obj's underlying member method code with example usage: obj.test_highdim_array_metrics() without return types