code: def test_large_array_metrics(self):
      y_true = np.ones((20000000, 4, 1), dtype=np.float32)
      y_pred = np.zeros((20000000, 4, 1), dtype=np.float32)
  
      assert_array_almost_equal(
          MAPE(y_true, y_pred, multioutput="raw_values"),
          [[100], [100], [100], [100]],
          decimal=2,
      )
      assert_array_almost_equal(
          MSE(y_true, y_pred, multioutput="raw_values"),
          [[1], [1], [1], [1]],
          decimal=2,
      )
      assert_array_almost_equal(
          MAE(y_true, y_pred, multioutput="raw_values"),
          [[1], [1], [1], [1]],
          decimal=2,
      )
  
      assert_almost_equal(
          MSE(y_true, y_pred, multioutput="uniform_average"),
          [1],
          decimal=2,
      )
      assert_almost_equal(
          MAPE(y_true, y_pred, multioutput="uniform_average"),
          [100],
          decimal=2,
      )
      assert_almost_equal(
          MAE(y_true, y_pred, multioutput="uniform_average"),
          [1],
          decimal=2,
      )
  
file_path: BigDL/python/orca/test/bigdl/orca/automl/test_metrics.py
imports: import pytest
  import numpy
  from bigdl.orca.test_zoo_utils import ZooTestCase
  from bigdl.orca.automl.metrics import ME, MAE, MSE, RMSE, MSLE, R2
  from bigdl.orca.automl.metrics import MPE, MAPE, MSPE, sMAPE, MDAPE, sMDAPE
  from numpy.testing import assert_almost_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 8 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_large_array_metrics() without return types