class_docstr: Test how metadata is combined.
class_docstr_tok: ["Test","how","metadata","is","combined","."]
docstr: Test the combine_metadata with arrays.
docstr_tok: ["Test","the","combine_metadata","with","arrays","."]
code: def test_combine_arrays(self):
      """Test the combine_metadata with arrays."""
      from numpy import arange, ones
      from xarray import DataArray
  
      from satpy.dataset.metadata import combine_metadata
  
      dts = [
          {"quality": (arange(25) % 2).reshape(5, 5).astype("?")},
          {"quality": (arange(1, 26) % 3).reshape(5, 5).astype("?")},
          {
              "quality": ones(
                  (
                      5,
                      5,
                  ),
                  "?",
              )
          },
      ]
      assert "quality" not in combine_metadata(*dts)
      dts2 = [{"quality": DataArray(d["quality"])} for d in dts]
      assert "quality" not in combine_metadata(*dts2)
      # the ancillary_variables attribute is actually a list of data arrays
      dts3 = [{"quality": [d["quality"]]} for d in dts]
      assert "quality" not in combine_metadata(*dts3)
      # check cases with repeated arrays
      dts4 = [
          {"quality": dts[0]["quality"]},
          {"quality": dts[0]["quality"]},
      ]
      assert "quality" in combine_metadata(*dts4)
      dts5 = [
          {"quality": dts3[0]["quality"]},
          {"quality": dts3[0]["quality"]},
      ]
      assert "quality" in combine_metadata(*dts5)
      # check with other types
      dts6 = [
          DataArray(arange(5), attrs=dts[0]),
          DataArray(arange(5), attrs=dts[0]),
          DataArray(arange(5), attrs=dts[1]),
          object(),
      ]
      assert "quality" not in combine_metadata(*dts6)
  
imports: import unittest
  from datetime import datetime
  import numpy
  import pytest
  from satpy.dataset.dataid import DataID, DataQuery, ModifierTuple, WavelengthRange, minimal_default_keys_config
  from satpy.readers.pmw_channels_definitions import FrequencyDoubleSideBand, FrequencyQuadrupleSideBand, FrequencyRange
  from satpy.tests.utils import make_cid, make_dataid, make_dsq
label_desc: Use image node_id 5 for calling the TestCombineMetadata obj's underlying member method code with example usage: obj.test_combine_arrays() without return types