+
    –°³j,  ã                  ó~   € ^ RI Ht ^ RIHt ]'       d   ^ RIHt ^RIHt ^ RIt ! R R4      t	R R	 lt
RR
 R lltR# )é    )Úannotations)ÚTYPE_CHECKING)ÚSequence©ÚDimNc                  óz   € ] tR t^t$ R]R&   RR R lltR R ltR R	 ltR
 R ltR R lt	R R lt
R R ltRtR# )ÚDimEntryz	Dim | intÚdataNc               ó    € V ^8„  d   QhRRRR/# )é   r
   zDim | int | NoneÚreturnÚNone© )Úformats   "ÚY/home/luca/screen-checking/.venv/lib/python3.14/site-packages/functorch/dim/_dim_entry.pyÚ__annotate__ÚDimEntry.__annotate__   s   € ÷ ñ Ð-ð ¸ñ ó    c                	óÎ   € ^RI Hp \        V4      \        J d   V^ 8¼  d   \	        RV 24      hM/Vf   ^ pM(\        W4      '       g   \	        R\        V4       24      hWn        R# )é   r   zExpected negative int, got NzExpected Dim, got )Ú r   ÚtypeÚintÚAssertionErrorÚ
isinstancer
   )Úselfr
   r   s   && r   Ú__init__ÚDimEntry.__init__   sa   € Ýä�‹:œÓØ�qŒyÜ$Ð'BÀ4À&Ð%IÓJÐJð àŠ\Ø‰Dä˜d×(Ò(Ü$Ð'9¼$¸t»*¸Ð%FÓGÐGØŽ	r   c               ó    € V ^8„  d   QhRRRR/# )r   ÚotherÚobjectr   Úboolr   )r   s   "r   r   r   !   s   € ÷ ñ ˜Fð  tñ r   c                	óH  € \        V\        4      '       g   R # V P                  4       '       d0   VP                  4       '       d   V P                  VP                  8H  # V P                  4       '       g/   VP                  4       '       g   V P                  VP                  J # R # ©F)r   r	   Úis_positionalr
   )r   r    s   &&r   Ú__eq__ÚDimEntry.__eq__!   sy   € Ü˜%¤×*Ò*Ùð ×Ñ×Ò E×$7Ñ$7×$9Ò$9à—9‘9 §
¡
Ñ*Ð*Ø×#Ñ#×%Ò%¨e×.AÑ.A×.CÒ.Cà—9‘9 §
¡
Ð*Ð*ñ r   c               ó   € V ^8„  d   QhRR/# ©r   r   r"   r   )r   s   "r   r   r   0   s   € ÷ 8ñ 8˜tñ 8r   c                	óf   € \        V P                  4      \        J ;'       d    V P                  ^ 8  # ©r   )r   r
   r   ©r   s   &r   r%   ÚDimEntry.is_positional0   s%   € Ü�D—I‘I‹¤#Ð%×7Ð7¨$¯)©)°a©-Ð7r   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   r   3   s   € ÷ 	"ñ 	"˜ñ 	"r   c                	óh   € ^RI Hp \        V P                  V4      '       d   R# V P                  ^ 8H  # )r   r   F)r   r   r   r
   )r   r   s   & r   Úis_noneÚDimEntry.is_none3   s)   € åä�d—i‘i ×%Ò%áð —9‘9 ‘>Ð!r   c               ó   € V ^8„  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   >   s   € ÷ ñ ˜#ñ r   c                	óœ   € \        V P                  \        4      '       g"   \        R \	        V P                  4       24      hV P                  # )zExpected int, got )r   r
   r   r   r   r,   s   &r   ÚpositionÚDimEntry.position>   s9   € Ü˜$Ÿ)™)¤S×)Ò)Ü Ð#5´d¸4¿9¹9³oÐ5FÐ!GÓHÐHØ�y‰yÐr   c               ó   € V ^8„  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   C   s   € ÷ ñ �Sñ r   c                	óp   € \        V P                  \        4      '       d   \        R 4      hV P                  # )zExpected Dim, got int)r   r
   r   r   r,   s   &r   ÚdimÚDimEntry.dimC   s)   € Ü�d—i‘i¤×%Ò%Ü Ð!8Ó9Ð9Ø�y‰yÐr   c               ó   € V ^8„  d   QhRR/# )r   r   Ústrr   )r   s   "r   r   r   H   s   € ÷ ñ ˜#ñ r   c                	ó,   € \        V P                  4      # ©N)Úreprr
   r,   s   &r   Ú__repr__ÚDimEntry.__repr__H   s   € Ü�D—I‘I‹Ðr   )r
   r=   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__r   r&   r%   r0   r4   r8   r?   Ú__static_attributes__r   r   r   r	   r	      s/   ‡ à
ƒO÷õõ8õ	"õõ
÷
ñ r   r	   c               ó    € V ^8„  d   QhRRRR/# )r   ÚlevelszSequence[DimEntry]r   r   r   )r   s   "r   r   r   L   s   € ÷ ñ Ð-ð °#ñ r   c                ó^   € ^ pV  F$  pVP                  4       '       g   K  V^,          pK&  	  V# r+   )r%   )rH   ÚrÚls   &  r   Úndim_of_levelsrL   L   s.   € Ø	€AÛˆØ�?‰?×ÔØ��FŠAñ ð €Hr   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   Útensorztorch.TensorÚfrom_levelszlist[DimEntry]Ú	to_levelsÚdrop_levelsr"   r   r   )r   s   "r   r   r   T   sA   € ÷ .Nñ .NØð.Nàð.Nð ð.Nð ð	.Nð
 ñ.Nr   c                ól  € W8X  d   V # V P                  4       pV P                  4       pV'       g%   \        V4      \        V4      8”  d   \        R4      h. p. pV FC  p VP	                  V4      p	VP                  WI,          4       VP                  WY,          4       KE  	  V P                  WgV P                  4       4      #   \         dg    TP                  4       '       d   TP                  ^4       M)TP                  TP                  4       P                   4       TP                  ^ 4        K×  i ; i)a"  
Reshape a tensor to match target levels using as_strided.

Args:
    tensor: Input tensor to reshape
    from_levels: Current levels of the tensor
    to_levels: Target levels to match
    drop_levels: If True, missing dimensions are assumed to have stride 0

Returns:
    Reshaped tensor
z,Cannot expand dimensions without drop_levels)ÚsizeÚstrideÚlenr   ÚindexÚappendÚ
ValueErrorr%   r8   Ú
as_stridedÚstorage_offset)
rN   rO   rP   rQ   ÚsizesÚstridesÚ	new_sizesÚnew_stridesÚlevelÚidxs
   &&&&      r   Ú_match_levelsra   T   s  € ð$ ÔØˆà�K‰K‹M€EØ�m‰m‹o€GçÜˆ{Óœc )›nÔ,Ü Ð!OÓPÐPà€IØ€Kãˆð	-Ø×#Ñ# EÓ*ˆCð ×Ñ˜U�ZÔ(Ø×Ñ˜w�|Ö,ñ ð ×Ñ˜Y°V×5JÑ5JÓ5LÓMÐMøô ô 	"à×"Ñ"×$Ò$Ø× Ñ  Õ#à× Ñ  §¡£×!1Ñ!1Ô2Ø×Ñ˜q×!ð	"ús   ÁCÃ D3Ã#AD3Ä2D3r$   )Ú
__future__r   Útypingr   Úcollections.abcr   r   r   Útorchr	   rL   ra   r   r   r   Ú<module>rf      s5   ðÝ "å  ÷ Ý(åã ÷
9ñ 9õx÷.Nñ .Nr   