공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.Array.add
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
요소별로 첫 번째 값을 두 번째 값에 더합니다.
인수 | 유형 | 세부정보 |
---|
다음과 같은 경우: left | 배열 | 왼쪽 값입니다. |
right | 배열 | 오른쪽 값입니다. |
예
코드 편집기 (JavaScript)
var empty = ee.Array([], ee.PixelType.int8());
print(empty.add(empty)); // []
print(ee.Array([0]).add(1)); // [1]
print(ee.Array([1]).add([2])); // [3]
print(ee.Array([-3]).add([-4])); // [-7]
print(ee.Array([5, 6]).add([7, 8])); // [12,14]
var array2x3 = ee.Array([[0, 1, 2], [3, 4, 5]]);
print(array2x3.add(1)); // [[1,2,3],[4,5,6]]
print(array2x3.add(array2x3)); // [[0,2,4],[6,8,10]]
Python 설정
Python API 및 geemap
를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
import ee
import geemap.core as geemap
Colab (Python)
empty = ee.Array([], ee.PixelType.int8())
display(empty.add(empty)) # []
display(ee.Array([0]).add(1)) # [1]
display(ee.Array([1]).add([2])) # [3]
display(ee.Array([-3]).add([-4])) # [-7]
display(ee.Array([5, 6]).add([7, 8])) # [12 ,14]
array2x3 = ee.Array([[0, 1, 2], [3, 4, 5]])
display(array2x3.add(1)) # [[1, 2 ,3], [4, 5, 6]]
display(array2x3.add(array2x3)) # [[0, 2, 4], [6, 8, 10]]
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003eArray.add()\u003c/code\u003e performs element-wise addition, adding the corresponding elements of two arrays or an array and a scalar.\u003c/p\u003e\n"],["\u003cp\u003eThe method returns a new array with the results of the addition.\u003c/p\u003e\n"],["\u003cp\u003eIt supports both single values and multi-dimensional arrays as input.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eArray.add()\u003c/code\u003e can be used with both server-side objects (like Images) and client-side objects (like Lists).\u003c/p\u003e\n"]]],["The `Array.add(right)` function performs element-wise addition between two arrays. The left-hand array is added to the right-hand array or value, returning a new array. It supports adding a scalar value to an array or adding two arrays of the same dimensions. Examples show how an empty array added to itself returns an empty array, single element arrays added to a scalar or array, as well as multi-element and multi-dimensional array addition.\n"],null,["# ee.Array.add\n\nOn an element-wise basis, adds the first value to the second.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------|---------|\n| Array.add`(right)` | Array |\n\n| Argument | Type | Details |\n|--------------|-------|-----------------------|\n| this: `left` | Array | The left-hand value. |\n| `right` | Array | The right-hand value. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nvar empty = ee.Array([], ee.PixelType.int8());\nprint(empty.add(empty)); // []\n\nprint(ee.Array([0]).add(1)); // [1]\nprint(ee.Array([1]).add([2])); // [3]\nprint(ee.Array([-3]).add([-4])); // [-7]\n\nprint(ee.Array([5, 6]).add([7, 8])); // [12,14]\n\nvar array2x3 = ee.Array([[0, 1, 2], [3, 4, 5]]);\nprint(array2x3.add(1)); // [[1,2,3],[4,5,6]]\nprint(array2x3.add(array2x3)); // [[0,2,4],[6,8,10]]\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nempty = ee.Array([], ee.PixelType.int8())\ndisplay(empty.add(empty)) # []\n\ndisplay(ee.Array([0]).add(1)) # [1]\ndisplay(ee.Array([1]).add([2])) # [3]\ndisplay(ee.Array([-3]).add([-4])) # [-7]\n\ndisplay(ee.Array([5, 6]).add([7, 8])) # [12 ,14]\n\narray2x3 = ee.Array([[0, 1, 2], [3, 4, 5]])\ndisplay(array2x3.add(1)) # [[1, 2 ,3], [4, 5, 6]]\ndisplay(array2x3.add(array2x3)) # [[0, 2, 4], [6, 8, 10]]\n```"]]