ó
    pñ:ixi  ã                   óZ  • S /r SSKrSSKrSSKrSSKrSSKrSSSSSSS	S	S
S	S	SSSSS.rSSSSSSSSSSSSSSS.r0 r	S r
S  rS! rS" rS# rS$ rS% rS& rS' rS( rS) rS* rS+ r " S, S-5      r " S. S/\5      rS0 rS1 rS2 rS3 rS4 rS5 rS6 rS7 r S8 r!S9 r"S: r# " S; S<\$5      r%  S>S= jr&g)?Úreadsavé    Nz>u1z>i2z>i4z>f4z>f8z>c8z|Oz>c16z>u2z>u4z>i8z>u8)é   é   é   é   é   é   é   é   é	   é
   é   é   é   é   é   ÚSTART_MARKERÚCOMMON_VARIABLEÚVARIABLEÚSYSTEM_VARIABLEÚ
END_MARKERÚ	TIMESTAMPÚCOMPILEDÚIDENTIFICATIONÚVERSIONÚHEAP_HEADERÚ	HEAP_DATAÚ	PROMOTE64ÚNOTICEÚDESCRIPTION)r   r   r   r   r	   r   r   r   r   r   é   é   é   é   c                 ój   • U R                  5       nUS-  S:w  a  U R                  US-   US-  -
  5        g)z+Align to the next 32-bit position in a filer   r   N)ÚtellÚseek)ÚfÚposs     ÚP/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/scipy/io/_idl.pyÚ	_align_32r+   K   s6   € ð �&‰&‹(€CØ
ˆQ�w�!ƒ|Ø	�‰ˆs�Q‰w˜˜q™Ñ Ô!Ø
ó    c                 ó&   • U R                  U5        g)zSkip `n` bytesN©Úread©r(   Úns     r*   Ú_skip_bytesr2   T   s   € à‡F�Fˆ1„IØ
r,   c                 ó$   • U R                  U5      $ )zRead the next `n` bytesr.   r0   s     r*   Ú_read_bytesr4   Z   s   € à�6‰6�!‹9Ðr,   c                 ó‚   • [         R                  " [        R                  " SU R	                  S5      SS 5      S   5      $ )zRead a single bytez>Br   Nr   r   )ÚnpÚuint8ÚstructÚunpackr/   ©r(   s    r*   Ú
_read_byter;   _   s/   € ä�8Š8”F—M’M $¨¯©¨q«	°"°1¨Ó6°qÑ9Ó:Ð:r,   c                 ó|   • [         R                  " [        R                  " SU R	                  S5      5      S   5      $ )úRead a signed 32-bit integerú>lr   r   ©r6   Úint32r8   r9   r/   r:   s    r*   Ú
_read_longrA   d   ó)   € ä�8Š8”F—M’M $¨¯©¨q«	Ó2°1Ñ5Ó6Ð6r,   c                 ó‚   • [         R                  " [        R                  " SU R	                  S5      SS 5      S   5      $ )zRead a signed 16-bit integerz>hr   r   r   )r6   Úint16r8   r9   r/   r:   s    r*   Ú_read_int16rE   i   s/   € ä�8Š8”F—M’M $¨¯©¨q«	°!°A¨Ó7¸Ñ:Ó;Ð;r,   c                 ó|   • [         R                  " [        R                  " SU R	                  S5      5      S   5      $ )r=   z>ir   r   r?   r:   s    r*   Ú_read_int32rG   n   rB   r,   c                 ó|   • [         R                  " [        R                  " SU R	                  S5      5      S   5      $ )zRead a signed 64-bit integerz>qr   r   )r6   Úint64r8   r9   r/   r:   s    r*   Ú_read_int64rJ   s   rB   r,   c                 ó‚   • [         R                  " [        R                  " SU R	                  S5      SS 5      S   5      $ )zRead an unsigned 16-bit integerz>Hr   r   r   )r6   Úuint16r8   r9   r/   r:   s    r*   Ú_read_uint16rM   x   s/   € ä�9Š9”V—]’] 4¨¯©°«°1°Q¨Ó8¸Ñ;Ó<Ð<r,   c                 ó|   • [         R                  " [        R                  " SU R	                  S5      5      S   5      $ )zRead an unsigned 32-bit integerú>Ir   r   )r6   Úuint32r8   r9   r/   r:   s    r*   Ú_read_uint32rQ   }   ó)   € ä�9Š9”V—]’] 4¨¯©°«Ó3°AÑ6Ó7Ð7r,   c                 ó|   • [         R                  " [        R                  " SU R	                  S5      5      S   5      $ )zRead an unsigned 64-bit integerz>Qr   r   )r6   Úuint64r8   r9   r/   r:   s    r*   Ú_read_uint64rU   ‚   rR   r,   c                 ó|   • [         R                  " [        R                  " SU R	                  S5      5      S   5      $ )zRead a 32-bit floatz>fr   r   )r6   Úfloat32r8   r9   r/   r:   s    r*   Ú_read_float32rX   ‡   ó)   € ä�:Š:”f—m’m D¨!¯&©&°«)Ó4°QÑ7Ó8Ð8r,   c                 ó|   • [         R                  " [        R                  " SU R	                  S5      5      S   5      $ )zRead a 64-bit floatz>dr   r   )r6   Úfloat64r8   r9   r/   r:   s    r*   Ú_read_float64r\   Œ   rY   r,   c                   ó   • \ rS rSrSrS rSrg)ÚPointeré‘   zClass used to define pointersc                 ó   • Xl         g ©N©Úindex)Úselfrc   s     r*   Ú__init__ÚPointer.__init__”   s
   € ØŒ
Ør,   rb   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__re   Ú__static_attributes__© r,   r*   r^   r^   ‘   s
   † Ù'õr,   r^   c                   ó   • \ rS rSrSrSrg)ÚObjectPointeré™   z$Class used to define object pointersrm   N)rg   rh   ri   rj   rk   rl   rm   r,   r*   ro   ro   ™   s   † Ù.Úr,   ro   c                 óz   • [        U 5      nUS:”  a'  [        X5      R                  S5      n[        U 5        U$ SnU$ )zRead a stringr   Úlatin1Ú )rA   r4   Údecoder+   )r(   ÚlengthÚcharss      r*   Ú_read_stringrw   ž   sA   € ä˜‹]€FØ�ƒzÜ˜AÓ&×-Ñ-¨hÓ7ˆÜ�!Œð €Lð ˆØ€Lr,   c                 ór   • [        U 5      nUS:”  a#  [        U 5      n[        X5      n[        U 5        U$ SnU$ )z.Read a data string (length is specified twice)r   rs   )rA   r4   r+   )r(   ru   Ústring_datas      r*   Ú_read_string_datarz   ©   sA   € ä˜‹]€FØ�ƒzÜ˜A“ˆÜ! !Ó,ˆÜ�!Œð Ðð ˆØÐr,   c                 ó  • US:X  a%  [        U 5      S:w  a  [        S5      e[        U 5      $ US:X  a  [        U 5      $ US:X  a  [        U 5      $ US:X  a  [	        U 5      $ US:X  a  [        U 5      $ US:X  a1  [	        U 5      n[	        U 5      n[        R                  " X#S-  -   5      $ US	:X  a  [        U 5      $ US
:X  a  [        S5      eUS:X  a1  [        U 5      n[        U 5      n[        R                  " X#S-  -   5      $ US:X  a  [        [        U 5      5      $ US:X  a  [        [        U 5      5      $ US:X  a  [        U 5      $ US:X  a  [        U 5      $ US:X  a  [        U 5      $ US:X  a  [        U 5      $ [        SU S35      e)z*Read a variable with a specified data typer   z*Error occurred while reading byte variabler   r   r   r   r	   y              ð?r
   r   z'Should not be here - please report thisr   r   r   r   r   r   r   zUnknown IDL type: z - please report this)rG   Ú	Exceptionr;   rE   rX   r\   r6   Ú	complex64rz   Ú
complex128r^   ro   rM   rQ   rJ   rU   )r(   ÚdtypeÚrealÚimags       r*   Ú
_read_datar‚   µ   s~  € à�ƒzÜ�q‹>˜QÓÜÐHÓIÐIÜ˜!‹}ÐØ	�!‹Ü˜1‹~ÐØ	�!‹Ü˜1‹~ÐØ	�!‹Ü˜QÓÐØ	�!‹Ü˜QÓÐØ	�!‹Ü˜QÓˆÜ˜QÓˆÜ�|Š|˜D¨"¡9Ñ,Ó-Ð-Ø	�!‹Ü  Ó#Ð#Ø	�!‹ÜÐAÓBÐBØ	�!‹Ü˜QÓˆÜ˜QÓˆÜ�}Š}˜T¨2¡IÑ-Ó.Ð.Ø	�"‹Ü”{ 1“~Ó&Ð&Ø	�"‹Üœ[¨›^Ó,Ð,Ø	�"‹Ü˜A‹ÐØ	�"‹Ü˜A‹ÐØ	�"‹Ü˜1‹~ÐØ	�"‹Ü˜A‹ÐäÐ,¨U¨GÐ3HÐIÓJÐJr,   c           	      óF  • US   nUS   n/ nU H¢  nUS   (       d
  US   (       a9  UR                  US   R                  5       US   4[        R                  45        MP  US   [        ;   a5  UR                  US   R                  5       US   4[        US      45        M’  [        SUS    S35      e   [        R                  R                  U4US	9n[        U5       H€  nU Hw  nUS   nUS   (       a)  [        U US
   US      US   US      5      XvS      U'   M;  US   (       a  [        XUS
   US      5      XvS      U'   Md  [        X5      XvS      U'   My     M‚     US   S:”  a5  US   S[        US   5       n	U	R                  5         UR                  U	5      nU$ )zu
Read a structure, with the array and structure descriptors given as
`array_desc` and `structure_desc` respectively.
Ú	nelementsÚtagtableÚ	structureÚarrayÚnameÚtypecodezVariable type ú not implemented©r   ÚarrtableÚstructtableÚndimsr   ÚdimsN)ÚappendÚlowerr6   Úobject_Ú
DTYPE_DICTr|   ÚrecÚrecarrayÚrangeÚ_read_structureÚ_read_arrayr‚   ÚintÚreverseÚreshape)
r(   Ú
array_descÚstruct_descÚnrowsÚcolumnsr   Úcolr†   Úir�   s
             r*   r—   r—   ß   sÒ  € ð �{Ñ#€EØ˜*Ñ%€Gà€EÛˆØˆ{×˜s 7Ÿ|Ø�L‰L˜3˜v™;×,Ñ,Ó.°°F±Ð<¼b¿j¹jÐIÖJà�:‰¤*Ó,Ø—‘˜s 6™{×0Ñ0Ó2°C¸±KÐ@Ü$.¨s°:©Ñ$?ðAö Bô   .°°Z±Ð0AÐAQÐ RÓSÐSñ ô —‘—‘  	°�Ð7€Iä�5Ž\ˆÛˆCØ˜
‘OˆEØ�;×Ü,;¸AØ&1°*Ñ&=¸cÀ&¹kÑ&JØ&1°-Ñ&@ÀÀVÁÑ&Mó-O�	˜f™+Ñ& qÓ)ð �W—Ü,7¸Ø&1°*Ñ&=¸cÀ&¹kÑ&Jó-L�	˜f™+Ñ& qÓ)ô -7°qÓ,@�	˜f™+Ñ& qÓ)ó ñ ð �'Ñ˜QÓØ˜&Ñ!Ð";¤3 z°'Ñ':Ó#;Ð<ˆØ�‰ŒØ×%Ñ% dÓ+ˆ	àÐr,   c                 óŠ  • US;   a]  US:X  a(  [        U 5      nX2S   :w  a  [        R                  " SSS9  [        R                  " U R                  US   5      [        U   S9nO–US;   a8  [        R                  " U R                  US   S	-  5      [        U   S9SS
S	2   nOX/ n[        US   5       H!  nUn[        X5      nUR                  U5        M#     [        R                  " U[        R                  S9nUS   S:”  a5  US   S
[        US   5       nUR                  5         UR                  U5      n[        U 5        U$ )zT
Read an array of type `typecode`, with the array descriptor given as
`array_desc`.
)	r   r   r   r   r	   r   r   r   r   r   Únbytesz.Not able to verify number of bytes from headerr   ©Ú
stacklevelr‹   )r   r   r   Nr„   rŽ   r�   )rG   ÚwarningsÚwarnr6   Ú
frombufferr/   r“   r–   r‚   r�   r‡   r’   r™   rš   r›   r+   )	r(   r‰   rœ   r£   r‡   r¡   r   Údatar�   s	            r*   r˜   r˜     sD  € ð Ð1Ó1à�q‹=Ü  “^ˆFØ HÑ-Ó-Ü—’ÐNØ)*ò,ô —’˜aŸf™f Z°Ñ%9Ó:Ü$.¨xÑ$8ñ:‰ð 
�WÓ	ô —’˜aŸf™f Z°Ñ%9¸!Ñ%;Ó<Ü$.¨xÑ$8ñ:Ø:;¸$¸Q¸$ñ@‰ð ˆÜ�z +Ñ.Ö/ˆAØˆEÜ˜aÓ'ˆDØ�L‰L˜Öñ 0ô
 —’˜¤b§j¡jÑ1ˆð �'Ñ˜QÓØ˜&Ñ!Ð";¤3 z°'Ñ':Ó#;Ð<ˆØ�‰ŒØ—‘˜dÓ#ˆô ˆa„Là€Lr,   c                 óÂ  • S[        U 5      0n[        U 5      nU[        U 5      R                  [        R                  5      S-  -  n[        U S5        US   [        ;  a  [        SUS    35      e[        US      US'   US   S;   aÞ  US   S:X  a  [        U 5      US'   O[        U 5      US'   [        U S5        [        U 5      nUS	   S
:X  a%  X R                  5       :X  a  SUS'   GO[[        S5      e[        U 5      nUS:w  a  [        S5      eUS   (       a  [        XS   US   5      US'   GOUS   (       a  [        XS	   US   5      US'   GOòUS	   n[        X5      US'   GOÝUS   S:X  a8  [        U S5        [        U 5      US'   [        U 5      US'   [        U 5      US'   GOœUS   S:X  a:  [        U 5      US'   [        U 5      US'   [        U 5      US'   [        U 5      US'   GOYUS   S:X  a,  [        U 5      US'   [        U 5      US '   [        U 5      US!'   GO$US   S":X  a  [        U 5      US#'   GOUS   S$:X  a  [        U 5      US%'   OóUS   S&:X  a:  [        U 5      US''   [!        US'   5       Vs/ s H  n[        U 5      PM     snUS('   O°US   S):X  aH  [        U 5      US*'   [        U 5      US+'   [!        US*   5       Vs/ s H  n[        U 5      PM     snUS,'   O_US   S-:X  a  S.US/'   OPUS   S0:X  a  ["        R$                  " S1S2S39  O1US   S4:X  a  ["        R$                  " S5S2S39  O[        S6US    S735      eU R'                  U5        U$ s  snf s  snf )8z!Function to read in a full recordÚrectypeì        r   zUnknown RECTYPE: )r   r   r   ÚvarnameÚ
heap_indexr‰   r   Nr©   zUnexpected type code: 0r
   zVARSTART is not 7r†   rœ   r�   r‡   r   i   ÚdateÚuserÚhostr   ÚformatÚarchÚosÚreleaseÚIDENTIFICATONÚauthorÚtitleÚidcoder   Únoticer    Údescriptionr   ÚnvaluesÚindicesÚCOMMONBLOCKÚnvarsrˆ   Úvarnamesr   TÚendÚUNKNOWNzSkipping UNKNOWN recordr   r¤   r   zSkipping SYSTEM_VARIABLE recordzrecord['rectype']=rŠ   )rA   rQ   Úastyper6   rI   r2   ÚRECTYPE_DICTr|   rw   Ú_read_typedescr&   Ú
ValueErrorr—   r˜   r‚   rz   r–   r¦   r§   r'   )r(   ÚrecordÚnextrecÚrectypedescÚvarstartr   Ú_s          r*   Ú_read_recordrÌ   ;  sˆ  € ð œ A›Ð'€Fä˜1‹o€GØŒ|˜A‹×%Ñ%¤b§h¡hÓ/°%Ñ7Ñ7€Gä��1ÔàˆiÑ¤Ó,ÜÐ+¨F°9Ñ,=Ð+>Ð?Ó@Ð@ä$ V¨IÑ%6Ñ7€Fˆ9ÑàˆiÑÐ5Ó5à�)Ñ 
Ó*Ü ,¨Q£ˆF�9Òä#-¨a£=ˆF�<Ñ Ü˜˜1Ôä$ QÓ'ˆà�zÑ" aÓ'àŸ&™&›(Ó"Ø!%��v“ä Ð!:Ó;Ð;ô " !“}ˆHØ˜1‹}ÜÐ 3Ó4Ð4à˜;×'Ü!0°ÀÑ4MØ4?ÀÑ4Nó"P��v“à˜W×%Ü!,¨Q¸JÑ0GØ0;¸LÑ0Ió"K��v“ð $ JÑ/�Ü!+¨AÓ!5��v“à	�	Ñ	˜kÓ	)ä�A�uÔÜ% a›ˆˆv‰Ü% a›ˆˆv‰Ü% a›ˆˆv‹à	�	Ñ	˜iÓ	'ä% a›=ˆˆxÑÜ% a›ˆˆv‰Ü# A“ˆˆt‰Ü(¨›OˆˆyÓà	�	Ñ	˜oÓ	-ä'¨›?ˆˆxÑÜ& q›/ˆˆw‰Ü'¨›?ˆˆxÓà	�	Ñ	˜hÓ	&ä'¨›?ˆˆxÓà	�	Ñ	˜mÓ	+ä 1°!Ó 4ˆˆ}Òà	�	Ñ	˜mÓ	+ä& q›MˆˆyÑÜ49¸&ÀÑ:KÔ4LÓMÒ4L¨qœZ¨ž]Ñ4LÑMˆˆyÒà	�	Ñ	˜mÓ	+ä$ Q›-ˆˆw‰Ü% a›ˆˆv‰Ü7<¸VÀG¹_Ô7MÓNÒ7M°!œl¨1žoÑ7MÑNˆˆzÒà	�	Ñ	˜lÓ	*àˆˆuŠà	�	Ñ	˜iÓ	'ä�ŠÐ/¸AÓ>à	�	Ñ	Ð/Ó	/ä�ŠÐ7ÀAÓFô Ð,¨V°IÑ->Ð,?Ð?OÐPÓQÐQà‡F�Fˆ7„Oà€Mùò5 Nùò Os   É8MË	Mc                 ó  • [        U 5      [        U 5      S.nUS   S-  S:X  a  [        S5      eUS   S-  S:H  US'   US   S-  S:H  US'   US   (       a  [        U 5      US	'   [        U 5      US
'   U$ US   (       a  [        U 5      US	'   U$ )z%Function to read in a type descriptor)r‰   ÚvarflagsrÎ   r   z System variables not implementedr   r‡   é    r†   rœ   r�   )rA   r|   Ú_read_arraydescÚ_read_structdesc)r(   Útypedescs     r*   rÅ   rÅ   §  s±   € ô ' q›M´zÀ!³}ÑE€Hà�
Ñ˜aÑ 1Ó$ÜÐ:Ó;Ð;à  Ñ,¨qÑ0°AÑ5€HˆWÑØ$ ZÑ0°2Ñ5¸Ñ;€Hˆ[Ñà�×Ü!0°Ó!3ˆ�ÑÜ"2°1Ó"5ˆ�Ñð €Oð 
�'×	Ü!0°Ó!3ˆ�Ñà€Or,   c                 óÈ  • S[        U 5      0nUS   S:X  a}  [        U S5        [        U 5      US'   [        U 5      US'   [        U 5      US'   [        U S5        [        U 5      US'   [        US   5       Vs/ s H  n[        U 5      PM     snUS'   U$ US   S	:X  a±  [        R                  " S
SS9  [        U S5        [        U 5      US'   [        U 5      US'   [        U 5      US'   [        U S5        SUS'   / US'   [        US   5       H<  n[        U 5      nUS:w  a  [        S5      eUS   R                  [        U 5      5        M>     U$ [        SUS    35      es  snf )z'Function to read in an array descriptorÚarrstartr   r   r£   r„   rŽ   Únmaxr�   é   z$Using experimental 64-bit array readr   r¤   r   zExpected a zero in ARRAY_DESCzUnknown ARRSTART: )rA   r2   r–   r¦   r§   rU   r|   r�   )r(   Ú	arraydescrË   ÚdÚvs        r*   rÐ   rÐ   »  s|  € ð œZ¨›]Ð+€Ià�Ñ Ó!ä�A�qÔä(¨›mˆ	�(ÑÜ!+¨A£ˆ	�+ÑÜ'¨›]ˆ	�'Ñä�A�qÔä& q›Mˆ	�&Ñä49¸)ÀFÑ:KÔ4LÓMÒ4L¨qœZ¨ž]Ñ4LÑMˆ	�&Ñð4 Ðð1 
�:Ñ	 "Ó	$ä�ŠÐ<ÈÒKä�A�qÔä*¨1›oˆ	�(ÑÜ!-¨a£ˆ	�+ÑÜ'¨›]ˆ	�'Ñä�A�qÔàˆ	�&Ñàˆ	�&ÑÜ�y Ñ(Ö)ˆAÜ˜1“ˆAØ�A‹vÜÐ ?Ó@Ð@Ø�fÑ×$Ñ$¤Z°£]Ö3ñ	 *ð Ðô Ð,¨Y°zÑ-BÐ,CÐDÓEÐEùò1 Ns   Á7Ec                 óæ  • 0 n[        U 5      nUS:w  a  [        S5      e[        U 5      US'   [        U 5      n[        U 5      US'   [        U 5      US'   US-  US'   US-  US	'   US
-  US'   US   (       Gd=  [        US   5       Vs/ s H  n[	        U 5      PM     snUS'   US    H  n[        U 5      US'   M     US    Vs0 s H  nUS   (       d  M  US   [        U 5      _M      snUS'   US    Vs0 s H  nUS   (       d  M  US   [        U 5      _M      snUS'   US	   (       d
  US   (       ar  [        U 5      US'   [        U 5      US'   [        US   5       Vs/ s H  n[        U 5      PM     snUS'   [        US   5       Vs/ s H  n[        U 5      PM     snUS'   U[        US   '   U$ US   [        ;  a  [        S5      e[        US      nU$ s  snf s  snf s  snf s  snf s  snf )z*Function to read in a structure descriptorr   zSTRUCTSTART should be 9rˆ   Úntagsr£   r   Úpredefr   Úinheritsr   Úis_superr…   r‡   rŒ   r†   r�   Ú	classnameÚnsupclassesÚsupclassnamesÚsupclasstablez"PREDEF=1 but can't find definition)rA   r|   rw   r–   Ú_read_tagdescrÐ   rÑ   ÚSTRUCT_DICT)r(   Ú
structdescÚstructstartrÜ   rË   Útags         r*   rÑ   rÑ   é  sY  € ð €Jä˜Q“-€KØ�aÓÜÐ1Ó2Ð2ä% a›€JˆvÑÜ˜‹]€FÜ$ Q›-€JˆwÑÜ% a›=€JˆxÑà! A™:€JˆxÑØ# a™Z€JˆzÑØ# a™Z€JˆzÑà�h×Ðô ,1°¸GÑ1DÔ+Eó"GÚ+E aô #0°Ö"2Ù+Eñ"Gˆ
�:Ñð ˜jÔ)ˆCÜ& q›/ˆC�‹Kñ *ð .8¸
Ò-Có"3Ú-C cØ%(¨¥\ó #B # f¡+¬¸qÓ/AÒ"AÙ-Cñ"3ˆ
�:Ñð
 1;¸:Ò0Fó%:Ú0F¨Ø(+¨KÕ(8ó &F S¨¡[Ô2BÀ1Ó2EÒ%EÙ0Fñ%:ˆ
�=Ñ!ð �j×! Z°
×%;Ü&2°1£oˆJ�{Ñ#Ü(2°1«ˆJ�}Ñ%ä).¨z¸-Ñ/HÔ)Ió+KÚ)I A”˜Q–Ñ)Iñ+KˆJ�Ñ'ô .3°:¸mÑ3LÔ-Mó+OÚ-M¨Ô  Ö#Ñ-Mñ+OˆJ�Ñ'ð +5Œ�J˜vÑ&Ñ'ð Ðð �fÑ¤[Ó0ÜÐ@ÓAÐAä  ¨FÑ!3Ñ4ˆ
àÐùò?"Gùò"3ùò%:ùò+Kùò+Os*   ÂGÃGÃGÃ5G$ÄG$Å G)ÆG.c                 óÊ   • S[        U 5      0nUS   S:X  a  [        U 5      US'   [        U 5      US'   [        U 5      nUS-  S:H  US'   US-  S:H  US'   US   [        ;   US'   U$ )	z$Function to read in a tag descriptorÚoffsetéÿÿÿÿr‰   r   r‡   rÏ   r†   Úscalar)rA   rU   r“   )r(   ÚtagdescÚtagflagss      r*   rã   rã     s…   € ð œ A›Ð'€GàˆxÑ˜BÓÜ(¨›Oˆ�Ñä$ Q›-€GˆJÑÜ˜!‹}€Hà !‘| qÑ(€GˆGÑØ# b™=¨BÑ.€GˆKÑØ 
Ñ+¬zÑ9€GˆHÑð €Nr,   c                 óè  • [        U [        5      (       a�  [        U [        5      (       a`  U R                  S:X  a  S n O6U R                  U;   a  XR                     n O[        R                  " SSS9  S n [        U [        5      (       a  M`  [        X5      u  p#U(       a  Un SU 4$ [        U [        R                  R                  5      (       a2  [        U 5       H  u  pE[        XQ5      u  p#U(       d  M  X0U'   M!     SU 4$ [        U [        R                  5      (       a2  [        U 5       H  u  pg[        Xq5      u  p#U(       d  M  X0U'   M!     SU 4$ [        U [        R                  5      (       a€  U R                  R                  [        R                  L aU  [        U R                   5       H<  n[        U R#                  U5      U5      u  p#U(       d  M)  X0R%                  S5      U'   M>     SU 4$ SU 4$ )Nr   zNVariable referenced by pointer not found in heap: variable will be set to Noner   r¤   TFrê   )Ú
isinstancer^   rc   r¦   r§   Ú_replace_heapr6   r”   r•   Ú	enumeraterÇ   Úndarrayr   Útyper’   r–   ÚsizeÚitemr›   )ÚvariableÚheapÚreplaceÚnewÚirrÇ   ÚivÚvalues           r*   rð   rð   2  s§  € ä�(œG×$Ñ$ä˜¤7×+Ñ+à�~‰~ Ó"Ø‘à—>‘> TÓ)Ø#§N¡NÑ3‘Hä—M’Mð #Jà-.ò0ð  $�Hô ˜¤7×+Ó+ô % XÓ4‰ˆæØˆHà�Xˆ~Ðä	�HœbŸf™fŸo™o×	.Ñ	.ô $ HÖ-‰JˆBä(¨Ó6‰LˆGçˆwØ"˜“ñ .ð �hˆÐä	�HœbŸi™i×	(Ñ	(ô # 8Ö,‰IˆBä(¨Ó5‰LˆGçˆwØ"˜“ñ -ð �hˆÐä	�HœbŸj™j×	)Ñ	)ð �>‰>×Ñ¤"§*¡*Ò,ä˜HŸM™MÖ*�ä,¨X¯]©]¸2Ó->ÀÓE‘�ç�7Ø/2×$Ñ$ RÓ(¨Ó,ñ +ð �hˆÐð �hˆÐr,   c                   óP   ^ • \ rS rSrSrSS jrU 4S jrU 4S jrS r\r	\r
SrU =r$ )	ÚAttrDictiu  a  
A case-insensitive dictionary with access via item, attribute, and call
notations:

    >>> from scipy.io._idl import AttrDict
    >>> d = AttrDict()
    >>> d['Variable'] = 123
    >>> d['Variable']
    123
    >>> d.Variable
    123
    >>> d.variable
    123
    >>> d('VARIABLE')
    123
    >>> d['missing']
    Traceback (most recent error last):
    ...
    KeyError: 'missing'
    >>> d.missing
    Traceback (most recent error last):
    ...
    AttributeError: 'AttrDict' object has no attribute 'missing'
c                 ó8   • Uc  0 n[         R                  X5        g ra   )Údictre   )rd   Úinits     r*   re   ÚAttrDict.__init__�  s   € Ø‰<ØˆDÜ�‰�dÕ!r,   c                 ó>   >• [         TU ]  UR                  5       5      $ ra   )ÚsuperÚ__getitem__r‘   )rd   rˆ   Ú	__class__s     €r*   r  ÚAttrDict.__getitem__”  s   ø€ Ü‰wÑ" 4§:¡:£<Ó0Ð0r,   c                 ó@   >• [         TU ]  UR                  5       U5      $ ra   )r  Ú__setitem__r‘   )rd   Úkeyrü   r  s      €r*   r	  ÚAttrDict.__setitem__—  s   ø€ Ü‰wÑ" 3§9¡9£;°Ó6Ð6r,   c                 óz   •  U R                  U5      $ ! [         a    [        S[        U 5       SU S35      S ef = f)NÚ'z' object has no attribute ')r  ÚKeyErrorÚAttributeErrorró   )rd   rˆ   s     r*   Ú__getattr__ÚAttrDict.__getattr__š  sS   € ð	NØ×#Ñ# DÓ)Ð)øÜó 	NÜ Ø”D˜“J�<Ð:¸4¸&ÀÐBóDØIMðNð	Nús   ‚ “':rm   ra   )rg   rh   ri   rj   rk   re   r  r	  r  Ú__setattr__Ú__call__rl   Ú__classcell__)r  s   @r*   rþ   rþ   u  s)   ø† ñô2"õ
1õ7òNð €KØ†Hr,   rþ   c           
      ó¨  • / nU(       d  U(       a  0 nO
[        5       n[        U S5      n[        US5      nUS:w  a  [        SU 35      e[        US5      n	U	S:X  a  GOªU	S:X  Ga•  U(       a  [	        S5        U(       a  [        US5      n
O[
        R                  " S	S
9n
U(       a  [	        SU
R                   35        U
R                  S5         [        U5      nU
R                  [        R                  " S[        U5      5      5        [        U5      nU[        U5      R                  [        R                   5      S-  -  nUR#                  S5      n[$        U   S:X  a‘  [        R                   " S5      nU
R                  [        R                  " S[        U5      U-  5      5        U
R                  [        R                  " S[        XÌU-  -
  U-  5      5      5        U
R                  U5        OäUR'                  5       n[(        R*                  " UR#                  XÏ-
  5      5      nU
R'                  5       [-        U5      -   S-   nU
R                  [        R                  " S[        US-  5      5      5        U
R                  [        R                  " S[        XÌS-  -
  S-  5      5      5        U
R                  U5        U
R                  U5        GM  UR/                  5         U
nUR1                  S5        O[        SU	 35      e [3        U5      nUR5                  U5        SU;   a  US   (       a  OM/  UR/                  5         0 nU H  nUS   S:X  d  M  US   UUS   '   M     U HE  nUS   S:X  d  M  [7        US   U5      u  nnU(       a  UUS'   US   UUS   R9                  5       '   MG     U(       Ga÷  U HL  nUS   S:X  d  M  [	        S5        [	        SUS    35        [	        SUS     35        [	        S!US"    35          O   U H]  nUS   S#:X  d  M  [	        S5        [	        S$US%    35        [	        S&US'    35        [	        S(US)    35        [	        S*US+    35          O   U HL  nUS   S,:X  d  M  [	        S5        [	        S-US.    35        [	        S/US0    35        [	        S1US2    35          O   U H*  nUS   S3:X  d  M  [	        S5        [	        S4US5    35          O   [	        S5        [	        S6[-        U5       S735        U Vs/ s H  nUS   PM
     nn[;        U5       H+  nUS:w  d  M  [	        S8UR=                  U5       S9U 35        M-     [	        S5        SU;   a=  [	        S:5        U H!  n[	        S8U S;[?        UU   5       S<35        M#     [	        S5        U(       a  U H  nUU   UU'   M     U$ U$ s  snf )=a	  
Read an IDL .sav file.

Parameters
----------
file_name : str
    Name of the IDL save file.
idict : dict, optional
    Dictionary in which to insert .sav file variables.
python_dict : bool, optional
    By default, the object return is not a Python dictionary, but a
    case-insensitive dictionary with item, attribute, and call access
    to variables. To get a standard Python dictionary, set this option
    to True.
uncompressed_file_name : str, optional
    This option only has an effect for .sav files written with the
    /compress option. If a file name is specified, compressed .sav
    files are uncompressed to this file. Otherwise, readsav will use
    the `tempfile` module to determine a temporary filename
    automatically, and will remove the temporary file upon successfully
    reading it in.
verbose : bool, optional
    Whether to print out information about the save file, including
    the records read, and available variables.

Returns
-------
idl_dict : AttrDict or dict
    If `python_dict` is set to False (default), this function returns a
    case-insensitive dictionary with item, attribute, and call access
    to variables. If `python_dict` is set to True, this function
    returns a Python dictionary with all variable names in lowercase.
    If `idict` was specified, then variables are written to the
    dictionary specified, and the updated dictionary is returned.

Examples
--------
>>> from os.path import dirname, join as pjoin
>>> import scipy.io as sio
>>> from scipy.io import readsav

Get the filename for an example .sav file from the tests/data directory.

>>> data_dir = pjoin(dirname(sio.__file__), 'tests', 'data')
>>> sav_fname = pjoin(data_dir, 'array_float32_1d.sav')

Load the .sav file contents.

>>> sav_data = readsav(sav_fname)

Get keys of the .sav file contents.

>>> print(sav_data.keys())
dict_keys(['array1d'])

Access a content with a key.

>>> print(sav_data['array1d'])
[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0.]

Úrbr   s   SRzInvalid SIGNATURE: s    s    zIDL Save file is compressedzw+bz.sav)Úsuffixz -> expanding to s   SR r>   r¬   r   r   rO   r   zInvalid RECFMT: rÁ   r«   r   r©   r®   r   r­   r   z2--------------------------------------------------zDate: r¯   zUser: r°   zHost: r±   r   zFormat: r²   zArchitecture: r³   zOperating System: r´   zIDL Version: rµ   r¶   zAuthor: r·   zTitle: r¸   z	ID Code: r¹   r    zDescription: r»   zSuccessfully read z records of which:z - z are of type zAvailable variables:z [Ú]) rþ   Úopenr4   r|   ÚprintÚtempfileÚNamedTemporaryFilerˆ   ÚwriterA   r8   Úpackr™   rQ   rÃ   r6   rI   r/   rÄ   r&   ÚzlibÚ
decompressÚlenÚcloser'   rÌ   r�   rð   r‘   ÚsetÚcountró   )Ú	file_nameÚidictÚpython_dictÚuncompressed_file_nameÚverboseÚrecordsÚ	variablesr(   Ú	signatureÚrecfmtÚfoutr«   rÈ   ÚunknownÚmodvalr)   Ú
rec_stringÚrr÷   rø   rù   rÇ   ÚrectypesÚrtÚvars                            r*   r   r   ¥  s–  € ðL €GÞ–eØ‰	ä“Jˆ	ô 	ˆY˜Ó€Aô ˜A˜qÓ!€IØ�EÓÜÐ-¨i¨[Ð9Ó:Ð:ô ˜˜AÓ€Fà�ÓÙà	�;Ô	æÜÐ/Ô0æ!ÜÐ.°Ó6‰Dä×.Ò.°fÑ=ˆDæÜÐ% d§i¡i [Ð1Ô2ð 	�
‰
�=Ô!ð ô ! “mˆGØ�J‰J”v—{’{ 4¬¨W«Ó6Ô7ô # 1“oˆGØ”| A“×-Ñ-¬b¯h©hÓ7¸%Ñ?Ñ?ˆGð —f‘f˜Q“iˆGô ˜GÑ$¨Ó4ÜŸš %›�Ø—
‘
œ6Ÿ;š; t¬S°«\¸FÑ-BÓCÔDØ—
‘
Ü—K’K ¤c¨7ÀÑ6FÑ+GÈ6Ñ*QÓ&RÓSôð —
‘
˜7Ô#Øð —&‘&“(ˆCô Ÿš¨¯©°±Ó)<Ó=ˆJð —i‘i“k¤C¨
£OÑ3°bÑ8ˆGð �J‰J”v—{’{ 4¬¨W°u©_Ó)=Ó>Ô?Ø�J‰J”v—{’{ 4¬¨gÀ5¹Ñ.IÈUÑ-RÓ)SÓTÔUØ�J‰J�wÔØ�J‰J�zÔ"òI ðN 	
�‰Œ	ð ˆØ	�‰ˆq�	ô Ð*¨6¨(Ð3Ó4Ð4ð Ü˜‹OˆØ�‰�qÔØ�A‹:Ø��xØñ ð ‡G�G„Ið €DÛˆØˆY‰<˜;Õ&Ø$% f¡IˆD��<‘Ó!ñ ó
 ˆØˆY‰<˜:Õ%Ü(¨¨6©°DÓ9‰LˆG�SÞØ��&‘	Ø./°©iˆI�a˜	‘l×(Ñ(Ó*Ó+ñ ÷ ó ˆFØ�iÑ  KÕ/Ü�f”Ü˜˜v f™~Ð.Ð/Ô0Ü˜˜v f™~Ð.Ð/Ô0Ü˜˜v f™~Ð.Ð/Ô0Ùñ ó ˆFØ�iÑ  IÕ-Ü�f”Ü˜ ¨Ñ!1Ð 2Ð3Ô4Ü˜ v¨f¡~Ð&6Ð7Ô8ÜÐ*¨6°$©<¨.Ð9Ô:Ü˜ f¨YÑ&7Ð%8Ð9Ô:Ùñ ó ˆFØ�iÑ  OÕ3Ü�f”Ü˜ ¨Ñ!1Ð 2Ð3Ô4Ü˜  w¡Ð0Ð1Ô2Ü˜	 &¨Ñ"2Ð!3Ð4Ô5Ùñ ó ˆFØ�iÑ  MÕ1Ü�f”Ü˜ f¨]Ñ&;Ð%<Ð=Ô>Ùñ	 ô 	ˆfŒÜÐ"¤3 w£< .Ð0BÐCÔDñ +2Ó2ª' Q�A�i”L©'ˆÐ2ä�h–-ˆBØ�\Õ!Ü˜˜HŸN™N¨2Ó.Ð/¨}¸R¸DÐAÖBñ  ô 	ˆfŒà˜Ó!ÜÐ(Ô)Û �Ü˜˜C˜5 ¤4¨	°#©Ó#7Ð"8¸Ð:Ö;ñ !ä�&ŒMæÛˆCØ" 3™ˆE�#‹Jñ àˆàÐùò% 3s   ÔW)NFNF)'Ú__all__r8   Únumpyr6   r  r  r¦   r“   rÄ   rä   r+   r2   r4   r;   rA   rE   rG   rJ   rM   rQ   rU   rX   r\   r^   ro   rw   rz   r‚   r—   r˜   rÌ   rÅ   rÐ   rÑ   rã   rð   r   rþ   r   rm   r,   r*   Ú<module>r8     s@  ðð< ˆ+€ã Û Û Û Û ð ØØØØØØØØØØØØØØñ€
ð" "Ø$ØØ$ØØØØ$ØØ!ØØØØ!ñ#€ð  €òòòò
;ò
7ò
<ò
7ò
7ò
=ò
8ò
8ò
9ò
9÷
ñ ô	�Gô 	ò
ò	ò'KòT)òX-ò`iòXò(+ò\3òlò&@ôF-ˆtô -ð` 05Ø16õpr,   