calculator.add¶
Functions¶
|
Add the two provided images element-wise. |
Module Contents¶
- calculator.add.add(image1, image2)¶
Add the two provided images element-wise.
- Parameters:
- Returns:
A new Image object holding the sum of the provided images.
- Return type:
Examples¶
>>> from calculator import add, Image >>> image1 = Image.from_array([[1, 2], [3, 4]]) >>> image2 = Image.from_array([[1, 1], [1, 1]]) >>> image3 = add(image1, image2) >>> image3.data array([[2, 3], [4, 5]])