Ë
    ¯Œjä  ã                   ó¬  — d dl Zd dlZd dlZd dl­ d„ Z ej                  d«      j                  Zdddded	k(  rdnd
d
dddœZej                  «       D ](  \  Z
Z ee
dz   edz   «       e
dv sŒ ee
dz   edz   «       Œ* dddddddddddœ
ej                  «       D � �ci c]  \  } }| |j                  «       “Œ c}} ¥Zd„ Zd„ Zd„ Zd„ Zd „ Zd!„ Zyc c}} w )"é    N)Ú*c                 ól   ‡ ‡‡— t        «       ‰   Šˆˆˆ fd„}t        ‰ ‰fd|i«      }|t        «       ‰ <   y)a  
    Dynamically construct deprecated classes as wrappers around renamed ones

    The deprecation warning added in their __new__-method will trigger upon
    construction of an instance of the class, but only once per session.

    We do this here (in __init__.py) because the base classes are defined in
    the SWIG interface, making it cumbersome to add the deprecation there.

    Parameters
    ----------
    deprecated_name : string
        Name of the class to be deprecated; _not_ present in SWIG interface.
    base_name : string
        Name of the class that is replacing deprecated_name; must already be
        imported into the current namespace.

    Returns
    -------
    None
        However, the deprecated class gets added to the faiss namespace
    c                 óx   •— d‰› d‰› d�}t        j                  |t        d¬«       t        ‰| �  | g|¢­i |¤Ž}|S )NzThe class faiss.z" is deprecated in favour of faiss.Ú!é   )Ú
stacklevel)ÚwarningsÚwarnÚDeprecationWarningÚsuperÚ__new__)ÚclsÚargsÚkwargsÚmsgÚinstanceÚ
base_classÚ	base_nameÚdeprecated_names        €€€úa/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/faiss/array_conversions.pyÚnew_methz-_make_deprecated_swig_class.<locals>.new_meth0   sT   ø€ à˜Ð/ð 0Ø�K˜qð"ð 	ô 	�‰�cÔ-¸!Õ<Ü˜ SÑ1°#ÐG¸ÒGÀÑGˆØˆó    r   N)ÚglobalsÚtype)r   r   r   Úklazzr   s   ``  @r   Ú_make_deprecated_swig_classr      s;   ú€ ô. “˜9Ñ%€Jöô � : -°)¸XÐ1FÓG€Eð "'„GƒIˆoÒr   ÚlÚFloat32ÚFloat64ÚInt8ÚInt32é   ÚInt64ÚUInt8ÚUInt64)ÚFloatÚDoubleÚCharÚIntÚLongÚLongLongÚByteÚUint64ÚVector)r&   r*   r,   ÚVectorVectorÚfloat32Úfloat64Úint8Úint16Úint32Úint64Úuint8Úuint16Úuint32Úuint64)
r   r   r    ÚInt16r!   r#   r$   ÚUInt16ÚUInt32r%   c                 óÊ  — | j                   j                  }|j                  d«      rt        | «      S |j                  d«      r‡t	        j
                  t        |dd    «      }t	        j                  | j                  «       |¬«      }| j                  «       dkD  r.t        t        |«      | j                  «       |j                  «       |S |j                  d«      sJ ‚t	        j
                  t        |dd    «      }t	        j                  | j                  «       |¬«      }| j                  «       dkD  r.t        t        |«      | j                  «       |j                  «       |S )	z%convert a C++ vector to a numpy arrayÚAlignedTableÚMaybeOwnedVectoré   N©Údtyper   r.   éúÿÿÿ)Ú	__class__Ú__name__Ú
startswithÚAlignedTable_to_arrayÚnprB   Úvector_name_mapÚemptyÚsizeÚmemcpyÚswig_ptrÚdataÚnbytesÚendswith©ÚvÚ	classnamerB   Úas       r   Úvector_to_arrayrU   o   s  € à—‘×$Ñ$€IØ×Ñ˜NÔ+Ü$ QÓ'Ð'Ø×ÑÐ.Ô/Ü—‘œ¨°2°3¨Ñ8Ó9ˆÜ�H‰H�Q—V‘V“X UÔ+ˆØ�6‰6‹8�aŠ<Ü”8˜A“; §¡£¨!¯(©(Ô3Øˆà×Ñ˜hÔ'Ð'Ð'Ü�H‰H”_ Y¨s° ^Ñ4Ó5€EÜ
�‰�—‘“ Ô'€AØ‡v�vƒx�!‚|ÜŒx˜‹{˜AŸF™F›H a§h¡hÔ/Ø€Hr   c                 ó   — t        | «      S )N)rU   )rR   s    r   Úvector_float_to_arrayrW   ƒ   s   € Ü˜1ÓÐr   c                 óò  — | j                   \  }|j                  j                  }|j                  d«      r¡|j                  sJ d«       ‚t        j                  t        |dd    «      }|| j                  k(  sJ d| j                  ›d|›d|›d�«       ‚|j                  |«       |d	kD  r.t        |j                  «       t        | «      | j                  «       y|j                  d
«      sJ ‚t        j                  t        |dd    «      }|| j                  k(  sJ d| j                  ›d|›d|›d�«       ‚|j                  |«       |d	kD  r/t        |j                  «       t        | «      | j                  «       yy)zcopy a numpy array to a vectorr?   z,cannot copy to an non-owned MaybeOwnedVectorr@   Nzcannot copy a z array to a z (should be Ú)r   r.   rC   )ÚshaperD   rE   rF   Úis_ownedrH   rB   rI   ÚresizerL   rN   rM   rO   rP   )rT   rR   ÚnrS   rB   s        r   Úcopy_array_to_vectorr^   ‡   s?  € à�7‰7�D€QØ—‘×$Ñ$€IØ×ÑÐ.Ô/Ø�zŠzÐIÐIÓIˆzÜ—‘œ¨°2°3¨Ñ8Ó9ˆà�Q—W‘WÒñ	
ð �G‹GÚÚð
ó	
Øð 	
�‰�ŒØˆqŠ5Ü�1—6‘6“8œX a›[¨!¯(©(Ô3Øà×Ñ˜hÔ'Ð'Ð'Ü�H‰H”_ Y¨s° ^Ñ4Ó5€EØ�A—G‘GÒñ Ø	�‹ÚÚðó Ðð
 ‡H�HˆQ„KØˆ1‚uÜˆq�v‰v‹xœ !› a§h¡hÕ/ð r   c                 óè   — | j                   \  }|j                  «       | j                  k(  sJ ‚|j                  |«       |dkD  r/t        |j	                  «       t        | «      | j                  «       y y )Nr   )rZ   Úitemsizer\   rL   ÚgetrM   rO   )rT   rR   r]   s      r   Úcopy_array_to_AlignedTablerb   ©   sV   € Ø�7‰7�D€Qà�:‰:‹<˜1Ÿ:™:Ò%Ð%Ð%Ø‡H�HˆQ„KØˆ1‚uÜˆq�u‰u‹wœ › Q§X¡XÕ.ð r   c                 ó¶   — | j                   dk(  rt        | j                  «      }n'| j                   dk(  rt        | j                  «      }nJ ‚t	        | |«       |S )Nr7   r6   )rB   ÚAlignedTableUint16rK   ÚAlignedTableUint8rb   )rT   rR   s     r   Úarray_to_AlignedTablerf   ²   sJ   € Ø‡w�w�(ÒÜ˜qŸv™vÓ&‰Ø	
�‰�GÒ	Ü˜aŸf™fÓ%‰àˆuÜ˜q !Ô$Ø€Hr   c                 óB  — | j                   j                  }|j                  d«      sJ ‚|dd j                  «       }t	        j
                  | j                  «       |¬«      }|j                  dkD  r.t        t        |«      | j                  «       |j                  «       |S )z(convert an AlignedTable to a numpy arrayr>   é   NrA   r   )rD   rE   rF   ÚlowerrH   rJ   rK   rL   rM   rN   rO   rQ   s       r   rG   rG   ½   sy   € à—‘×$Ñ$€IØ×Ñ Ô/Ð/Ð/Ø�b�cˆN× Ñ Ó"€EÜ
�‰�—‘“ Ô'€AØ‡v�v�‚zÜŒx˜‹{˜AŸF™F›H a§h¡hÔ/Ø€Hr   )ÚnumpyrH   Úarrayr	   Úfaiss.loaderr   r`   Úsizeof_longÚdeprecated_name_mapÚitemsÚdepr_prefixÚbase_prefixri   rI   rU   rW   r^   rb   rf   rG   )ÚkrR   s   00r   Ú<module>rs      s*  ðó Û Û ä ò('ð^ ˆe�k‰k˜#Ó×'Ñ'€ð ØØØØ" aÒ'‰G¨WØØàñÐ ð !4× 9Ñ 9Ö ;Ñ€K�Ù ¨hÑ 6¸ÀhÑ8NÔOð Ð/Ò/Ù#Ø˜.Ñ(¨+¸Ñ*Fõ	
ð !<ð ØØØØØØØØØñð !4× 9Ñ 9Ô ;Ô<Ñ ;™˜˜1€qˆ!�'‰'‹)�|Ð ;Ò<ð€òò(ò0òD/òóùóe =s   ÂC