§
    OŠtjw  ã                   óJ   — d dl mZmZ d dlmZ d dlmZ  G d„ de¦  «        ZdS )é    )ÚBasicÚExpr)Ú_sympify)Ú	transposec                   ó    — e Zd ZdZd„ Zdd„ZdS )Ú
DotProductaC  
    Dot product of vector matrices

    The input should be two 1 x n or n x 1 matrices. The output represents the
    scalar dotproduct.

    This is similar to using MatrixElement and MatMul, except DotProduct does
    not require that one vector to be a row vector and the other vector to be
    a column vector.

    >>> from sympy import MatrixSymbol, DotProduct
    >>> A = MatrixSymbol('A', 1, 3)
    >>> B = MatrixSymbol('B', 1, 3)
    >>> DotProduct(A, B)
    DotProduct(A, B)
    >>> DotProduct(A, B).doit()
    A[0, 0]*B[0, 0] + A[0, 1]*B[0, 1] + A[0, 2]*B[0, 2]
    c                 ó€  — t          ||f¦  «        \  }}|j        st          d¦  «        ‚|j        st          d¦  «        ‚d|j        vrt          d¦  «        ‚d|j        vrt          d¦  «        ‚t	          |j        ¦  «        t	          |j        ¦  «        k    rt          d¦  «        ‚t          j        | ||¦  «        S )Nz(Argument 1 of DotProduct is not a matrixz(Argument 2 of DotProduct is not a matrixé   z(Argument 1 of DotProduct is not a vectorz(Argument 2 of DotProduct is not a vectorz,DotProduct arguments are not the same length)r   Ú	is_MatrixÚ	TypeErrorÚshapeÚsetr   Ú__new__)ÚclsÚarg1Úarg2s      úc/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sympy/matrices/expressions/dotproduct.pyr   zDotProduct.__new__   s½   € Ý˜t T˜lÑ+Ô+‰
ˆˆdàŒ~ð 	HÝÐFÑGÔGÐGØŒ~ð 	HÝÐFÑGÔGÐGØ�T”Z��ÝÐFÑGÔGÐGØ�T”Z��ÝÐFÑGÔGÐGåˆtŒz‰?Œ?�c $¤*™oœoÒ-Ð-ÝÐJÑKÔKÐKåŒ}˜S $¨Ñ-Ô-Ð-ó    Fc                 ó  — | j         d         j        | j         d         j        k    rn| j         d         j        d         dk    r)| j         d         t          | j         d         ¦  «        z  }n–t          | j         d         ¦  «        | j         d         z  }nm| j         d         j        d         dk    r| j         d         | j         d         z  }n5t          | j         d         ¦  «        t          | j         d         ¦  «        z  }|d         S )Nr   r
   )Úargsr   r   )ÚselfÚexpandÚhintsÚmuls       r   ÚdoitzDotProduct.doit+   sØ   € ØŒ9�QŒ<Ô ¤¨1¤Ô!3Ò3Ð3ØŒy˜Œ|Ô! !Ô$¨Ò)Ð)Ø”i ”l¥9¨T¬Y°q¬\Ñ#:Ô#:Ñ:��å ¤	¨!¤Ñ-Ô-¨d¬i¸¬lÑ:��àŒy˜Œ|Ô! !Ô$¨Ò)Ð)Ø”i ”l 4¤9¨Q¤<Ñ/��å ¤	¨!¤Ñ-Ô-­i¸¼	À!¼Ñ.EÔ.EÑE�à�1Œvˆr   N)F)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   © r   r   r   r      sA   € € € € € ðð ð&.ð .ð .ð"ð ð ð ð ð r   r   N)Ú
sympy.corer   r   Úsympy.core.sympifyr   Ú$sympy.matrices.expressions.transposer   r   r    r   r   ú<module>r$      su   ðØ "Ð "Ð "Ð "Ð "Ð "Ð "Ð "Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø :Ð :Ð :Ð :Ð :Ð :ð1ð 1ð 1ð 1ð 1�ñ 1ô 1ð 1ð 1ð 1r   