o
    +< i°  ã                   @   s    d Z ddlmZmZ dd„ ZdS )zj
Limited tests of the visualization module. Right now it just makes
sure that passing custom Axes works.

é    )ÚmpÚfpc                  C   s(  z(dd l } | j d¡d }| d¡d d… }dd„ |D ƒddgk r#t‚dd l}W n ty6   tdƒ Y d S w | ¡ }| d	¡}tt	fD ]}|j
d
d„ ddg|d | ¡ dksZJ ‚| ¡ dksbJ ‚qD| ¡ }| d	¡}tt	fD ]}|jdd„ ddgddg|d qp| ¡ dksŠJ ‚| ¡ dks’J ‚d S )Nr   ú-Ú.é   c                 S   s   g | ]}t |ƒ‘qS © )Úint)Ú.0Ú_r   r   úZ/home/app/PyTorch/.pytorch/lib/python3.10/site-packages/mpmath/tests/test_visualization.pyÚ
<listcomp>   s    ztest_axes.<locals>.<listcomp>éc   z8
Skipping test (pylab not available or too old version)
éo   c                 S   s   | d S )Nr   r   )Úxr   r   r   Ú<lambda>   s    ztest_axes.<locals>.<lambda>é   )Úaxesr   zf(x)c                 S   s   | S )Nr   )Úzr   r   r   r      s    éþÿÿÿiöÿÿÿé
   zRe(z)zIm(z))Ú
matplotlibÚ__version__ÚsplitÚImportErrorÚpylabÚprintZfigureZadd_subplotr   r   ZplotZ
get_xlabelZ
get_ylabelZcplot)r   Úversionr   Zfigr   Úctxr   r   r   Ú	test_axes	   s.   þ

 r   N)Ú__doc__Zmpmathr   r   r   r   r   r   r   Ú<module>   s    