a
    dG                     @   s$   d Z ddlZejejdddZdS )z4Module containing numerical functionalities for SfM.    N)xreturnc              
   C   s|   | j d dkst| j | d }| d }| d }t|}tj|| |||| | ||g	dd}| j dd d }|j| S )	a  Return the cross_product_matrix symmetric matrix of a vector.

    Args:
        x: The input vector to construct the matrix in the shape :math:`(*, 3)`.

    Returns:
        The constructed cross_product_matrix symmetric matrix with shape :math:`(*, 3, 3)`.
       ).r   ).   ).   )ZdimN)r   r   )shapeAssertionErrortorchZ
zeros_likestackview)r   Zx0x1Zx2zerosZcross_product_matrix_flatZshape_ r   i/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/kornia/geometry/epipolar/numeric.pycross_product_matrix   s    	

&r   )__doc__r
   ZTensorr   r   r   r   r   <module>   s   