§
    ‡Ûg<  ã                   óÚ  — d dl Z d dlmZmZ d dlmZ d dlmZ d„ Zd„ Z	d„ Z
e j                             dd	d
idfdddœdfdd
idfdd
idfdd
gg d¢dœdfdd
gg d¢dœdff¦  «        d„ ¦   «         Ze j                             ddd
idfddgd dœd fd!d
id"fd!did#fd$d d%œd&fd'd d%œd(fd)d d%œd*fd+d d,dgdgd-œd.fd+d d,dgdgd/œd0ff	¦  «        d1„ ¦   «         Zd2„ Z ed3g¬4¦  «        d5„ ¦   «         ZdS )6é    N)Úassert_allcloseÚassert_array_equal)ÚSankey)Úcheck_figures_equalc                  óJ   — t          ¦   «         } |                      ¦   «          d S )N)r   Úadd)Úsankeys    úR/granary/edev/quantum/lib/python3.11/site-packages/matplotlib/tests/test_sankey.pyÚtest_sankeyr      s   € å‰XŒX€FØ
‡J‚J�L„L€L€L€Ló    c                  ó�   — t          dgdgdg¬¦  «        } | j        d         j        d                              ¦   «         dk    sJ ‚d S )Nç      Ð?ÚFirstéÿÿÿÿ)ÚflowsÚlabelsÚorientationsr   z
First
0.25©r   ÚdiagramsÚtextsÚget_text)Úss    r
   Ú
test_labelr      sM   € Ý�d�V W I¸R¸DÐAÑAÔA€AØŒ:�aŒ=Ô˜qÔ!×*Ò*Ñ,Ô,°Ò=Ð=Ð=Ð=Ð=Ð=r   c                  ó˜   — d„ } t          dgdgdg| ¬¦  «        }|j        d         j        d                              ¦   «         dk    sJ ‚d S )Nc                 ó
   — | d›S )Nz.3f© )Úvalues    r
   Úshow_three_decimal_placesz=test_format_using_callable.<locals>.show_three_decimal_places   s   € Øˆ~ˆ~Ðr   r   r   r   )r   r   r   Úformatr   zFirst
0.250r   )r   r   s     r
   Útest_format_using_callabler       si   € ðð ð õ 	�d�V W I¸R¸DØ/ð	1ñ 	1ô 	1€Að Œ:�aŒ=Ô˜qÔ!×*Ò*Ñ,Ô,°Ò>Ð>Ð>Ð>Ð>Ð>r   zkwargs, msgÚgapr   z'gap' is negativeé   é   )r!   Úradiusz'radius' is greater than 'gap'Ú
head_anglez'head_angle' is negativeÚ	tolerancez'tolerance' is negative)r   r   r"   ©r   r   z/The shapes of 'flows' \(2,\) and 'orientations')ÚaÚbÚc)r   r   z)The shapes of 'flows' \(2,\) and 'labels'c                 ó†   — t          j        t          |¬¦  «        5  t          di | ¤Ž d d d ¦  «         d S # 1 swxY w Y   d S )N©Úmatchr   )ÚpytestÚraisesÚ
ValueErrorr   )ÚkwargsÚmsgs     r
   Útest_sankey_errorsr3      s‘   € õ 
Œ•z¨Ð	-Ñ	-Ô	-ð ð ÝÐÐ�ÐÐÐðð ð ñ ô ð ð ð ð ð ð ð øøøð ð ð ð ð ð s   œ6¶:½:Útrunklengthz'trunklength' is negativeçš™™™™™É?g333333Ó?)r   ÚpriorzThe scaled sum of the connectedr6   z*The index of the prior diagram is negativez#The index of the prior diagram is 1)r   r"   )Úconnectr6   zAt least one of the connection)r#   r"   z"The connection index to the source)r"   é   z The connection index to this dia)r"   r"   çš™™™™™É¿)r7   r6   r   r   zThe value of orientations)r7   r6   r   ÚpathlengthszThe lengths of 'flows'c                 óÔ   — t          ¦   «         }t          j        t          |¬¦  «        5  |                     ddg¬¦  «          |j        di | ¤Ž d d d ¦  «         d S # 1 swxY w Y   d S )Nr,   r5   r9   )r   r   )r   r.   r/   r0   r   )r1   r2   r	   s      r
   Útest_sankey_add_errorsr<   .   s¶   € õ ‰XŒX€FÝ	Œ•z¨Ð	-Ñ	-Ô	-ð ð Ø�
Š
˜#˜t˜ˆ
Ñ%Ô%Ð%ØˆŒ
ÐÐ�VÐÐÐðð ð ñ ô ð ð ð ð ð ð ð øøøð ð ð ð ð ð s   ª&AÁA!Á$A!c                  óÐ  — t          g d¢dgdgd¬¦  «        } |                      ¦   «         }t          |d         j        g d¢¦  «         |d         j        g d¢k    sJ ‚t          d„ |d         j        D ¦   «         ¦  «        sJ ‚t          d	„ |d         j        D ¦   «         ¦  «        sJ ‚|d         j                             ¦   «         d
k    sJ ‚t          |d         j
        g d¢¦  «         t          g d¢dgdgd¬¦  «        } |                      ¦   «         }t          |d         j        g d¢¦  «         |d         j        g d¢k    sJ ‚t          |d         j
        g d¢¦  «         d S )N)r   ç      Ð¿ç      à?ç      à¿ÚFoor   ÚBar)r   r   r   Úunitr   )r"   r8   r"   r8   c                 óN   — g | ]"}|                      ¦   «         d d…         dk    ‘Œ#S )r   r8   rA   ©r   ©Ú.0Útexts     r
   ú
<listcomp>z test_sankey2.<locals>.<listcomp>H   s.   € ÐFÐFÐF°$�—’‘”  ! Ô$¨Ò-ÐFÐFÐFr   c                 óN   — g | ]"}|                      ¦   «         d d…         dk    ‘Œ#S )éýÿÿÿNrB   rE   rF   s     r
   rI   z test_sankey2.<locals>.<listcomp>I   s.   € ÐFÐFÐF°$�—’‘”   Ô$¨Ò-ÐFÐFÐFr   Ú )©g      ö¿g=§Ã¤à¿©g      ö?g6µ	ƒt)è¿©g      è¿gƒÕ�A“Ú¿©g      è?g±qXu±„ë¿)r   r>   r   r?   r@   )r"   r8   Nr"   r8   )rM   rN   )r   r   rO   rP   )r   Úfinishr   r   ÚanglesÚallr   rH   r   r   Útips)r   Úsfs     r
   Útest_sankey2rV   B   s²  € ÝÐ-Ð-Ð-°u°gØ˜D uð	.ñ 	.ô 	.€Aà	
�Š‰Œ€BÝ�r˜!”u”{Ð$<Ð$<Ð$<Ñ=Ô=Ð=ØˆaŒ5Œ<˜<˜<˜<Ò'Ð'Ð'Ð'ÝÐFÐF¸"¸Q¼%¼+ÐFÑFÔFÑGÔGÐGÐGÐGÝÐFÐF¸"¸Q¼%¼+ÐFÑFÔFÑGÔGÐGÐGÐGØˆaŒ5Œ:×ÒÑ Ô  BÒ&Ð&Ð&Ð&Ý�B�q”E”Jð)ð )ð )ñ*ô *ð *õ 	Ð0Ð0Ð0¸%¸Ø˜D uð	.ñ 	.ô 	.€Aà	
�Š‰Œ€BÝ�r˜!”u”{Ð$?Ð$?Ð$?Ñ@Ô@Ð@ØˆaŒ5Œ<Ð-Ð-Ð-Ò-Ð-Ð-Ð-Ý�B�q”E”Jð)ð )ð )ñ*ô *ð *ð *ð *r   Úpng)Ú
extensionsc                 ó(  — |                       ¦   «         }t          |g d¢g d¢¬¦  «        }|                     ¦   «          |                      ¦   «         }t          |¬¦  «        }|                     g d¢g d¢¬¦  «         |                     ¦   «          d S )N)r   r>   r>   r   r?   r@   )r"   r   r"   r   r   r   )Úaxr   r   )rZ   r'   )Úgcar   rQ   r   )Úfig_testÚfig_refÚax_testÚs_testÚax_refÚs_refs         r
   Útest_sankey3rb   ^   sŸ   € à�lŠl‰nŒn€GÝ�wÐ&KÐ&KÐ&KØ!5Ð!5Ð!5ð7ñ 7ô 7€Fà
‡M‚M�O„O€Oà�[Š[‰]Œ]€FÝ�fÐÑÔ€EØ	‡I‚IÐ9Ð9Ð9Ø/Ð/Ð/ð ñ 1ô 1ð 1à	‡L‚L�N„N€N€N€Nr   )r.   Únumpy.testingr   r   Úmatplotlib.sankeyr   Úmatplotlib.testing.decoratorsr   r   r   r    ÚmarkÚparametrizer3   r<   rV   rb   r   r   r
   ú<module>rh      sN  ðØ €€€Ø =Ð =Ð =Ð =Ð =Ð =Ð =Ð =à $Ð $Ð $Ð $Ð $Ð $Ø =Ð =Ð =Ð =Ð =Ð =ðð ð ð>ð >ð >ð
	?ð 	?ð 	?ð „×Ò˜ØˆR€[Ð%Ð&Ø˜!ÐÐÐ>Ð?Ø�BÐÐ3Ð4Ø�2ÐÐ1Ð2Ø�2ˆw¨
¨
¨
Ð3Ð3Ø7ð9à�2ˆw / / /Ð2Ð2Ø1ð3ð	)ñ 	ô 	ðð ñ	ô 	ðð
 „×Ò˜Ø�RÐÐ5Ð6Ø�Sˆz AÐ&Ð&Ð(IÐJØˆr€]Ð@ÐAØˆq€\Ð8Ð9Ø 1Ð%Ð%Ð'GÐHØ !Ð$Ð$Ð&JÐKØ !Ð$Ð$Ð&HÐIØ !¨t°S¨kØ�cðð Ø7ð9à !¨t°S¨kØ�Sðð Ø3ð5ð)ñ ô ðð ñô ðð*ð *ð *ð8 Ð  Ð(Ñ(Ô(ð
ð 
ñ )Ô(ð
ð 
ð 
r   