Ë
    »dæj  ã                   óN   — d Z ddlZddlZddlmZ  G d„ dej                  «      Zy)zC types for Matrix.é    N)Údoc_controlsc                   óÀ   — e Zd ZdZdej
                  fdej
                  fd ej                  ej                  «      fgZe	j                  dej                  fd„«       Zy)ÚMatrixCzThe ctypes struct for Matrix.ÚrowsÚcolsÚdataÚreturnc                 ó6  — | j                   r| j                  dk(  s| j                  dk(  rt        j                  d«      S t        j
                  j                  | j                   | j                  | j                  f¬«      j                  «       }|j                  S )aS  Copies the MatrixC struct to a numpy array.

    The data is reshaped from column-major order to (cols, rows) and then
    transposed to a row-major numpy array. The underlying data is copied to
    ensure the data is not freed when the underlying C Matrix is closed.

    Returns:
      A numpy array representing the MatrixC struct.
    r   )r   )Úshape)	r   r   r   ÚnpÚemptyÚ	ctypeslibÚas_arrayÚcopyÚT)ÚselfÚnp_arrays     úx/root/repos/pocs/video-evals/.venv/lib/python3.12/site-packages/mediapipe/tasks/python/components/containers/matrix_c.pyÚto_numpyzMatrixC.to_numpy!   sr   € ð �9Š9˜Ÿ	™	 Qš¨$¯)©)°qª.Ü�X‰X�d‹^Ðä�|‰|×$Ñ$Ø�	‰	˜$Ÿ)™) T§Y¡YÐ/ð %ó ç
�dƒfð ð �:‰:Ðó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚctypesÚc_uint32ÚPOINTERÚc_floatÚ_fields_r   Údo_not_generate_docsr   Úndarrayr   © r   r   r   r      sb   „ Ù%ð ˆv�‰ÐØˆv�‰ÐØˆ~ˆv�~‰~˜fŸn™nÓ-Ð.ð€(ð ×$Ñ$ð˜Ÿ
™
ò ó %ñr   r   )r   r   Únumpyr   Ú1mediapipe.tasks.python.core.optional_dependenciesr   Ú	Structurer   r"   r   r   ú<module>r&      s%   ðñ ã ã å Jôˆf×Ñõ r   