calculator ========== .. py:module:: calculator Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/calculator/_image/index /autoapi/calculator/_utils/index /autoapi/calculator/add/index /autoapi/calculator/subtract/index Attributes ---------- .. autoapisummary:: calculator.PI Classes ------- .. autoapisummary:: calculator.Image Functions --------- .. autoapisummary:: calculator.add Package Contents ---------------- .. py:class:: Image(data) .. py:attribute:: _data :type: numpy.ndarray .. py:property:: data :type: numpy.ndarray .. py:method:: from_array(data) :classmethod: .. py:method:: from_file(file_path) :classmethod: .. py:function:: add(image1, image2) Add the two provided images element-wise. :param image1: The first image to be added. :param image2: The second image to be aded. :returns: A new Image object holding the sum of the provided images. 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]]) .. py:data:: PI :value: 3.1415