MCPcopy
hub / github.com/google/earthengine-api / test_array_flatten

Method test_array_flatten

python/ee/tests/image_test.py:1024–1043  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1022 self.assertEqual(expect, result)
1023
1024 def test_array_flatten(self):
1025 coordinate_labels = ['b', 'c']
1026 separator = 'a separator'
1027 expect = make_expression_graph({
1028 'arguments': {
1029 'image': IMAGE,
1030 'coordinateLabels': {'constantValue': coordinate_labels},
1031 'separator': {'constantValue': separator},
1032 },
1033 'functionName': 'Image.arrayFlatten',
1034 })
1035 expression = ee.Image('a').arrayFlatten(coordinate_labels, separator)
1036 result = json.loads(expression.serialize())
1037 self.assertEqual(expect, result)
1038
1039 expression = ee.Image('a').arrayFlatten(
1040 coordinateLabels=coordinate_labels, separator=separator
1041 )
1042 result = json.loads(expression.serialize())
1043 self.assertEqual(expect, result)
1044
1045 def test_array_get(self):
1046 expect = make_expression_graph({

Callers

nothing calls this directly

Calls 3

arrayFlattenMethod · 0.80
make_expression_graphFunction · 0.70
serializeMethod · 0.45

Tested by

no test coverage detected