� 1&XLc@s4ddlZddlmZmZddljZddlm Z ddl m Z ddl Z ddl Z eddg�d��Zeddd gd d gd d �d��Zd�Zd�Zeddg�d��Zeddg�d��Zedkr0ddlZejdddgde�ndS(i����N(timage_comparisontknownfailureif(t assert_raises(tassert_array_equaltbaseline_imagest image_interpscCs�tjd�}|jdd�}tj�}|jd�}|j|dd�|jd�|jd�|jd�}|j|dd �|jd �|jd �}|j|dd �|jd �|j d �d S(s4make the basic nearest, bilinear and bicubic interpsidiii7t interpolationtneareststhree interpolationsi8tbilineari9tbicubicRN( tnptarangetreshapetplttfiguret add_subplottimshowt set_titlet set_ylabeltsavefig(tXtfigtax1tax2tax3((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyttest_image_interps s     s figimage-0s figimage-1t extensionstpngttolg�~j�t�X?c Cs�x�ttfD]�}tjdddd�}||_tjtjd�dtjd�d�\}}tj|d|d||�}tjd|dd|d�}||d}|j |d d d d d d �|j |ddd�dd�fd d d dd d �|j |dd�ddd�fd dd d d d �|j |ddd�ddd�fd dd dd d �|j dt |�dd�q WdS(stest the figimage methodtfigsizeitdpiidgY@ii2itxoityotorigintlowerNi����s figimage-%d(ii( tFalsetTrueR RtsuppressCompositeR tix_R tsintfigimageRtint(R%Rtxtytztctimg((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt test_figimage!s 2##88;cCshtj�}|jd�}|jdddg�tj�}|j|�|jd�tj|�dS(Nioiiii( R RRtplott cStringIOtStringIORtseektimread(Rtaxtbuffer((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyttest_image_python_io4s    cCs�ddlm}|jd�|jdd�}tj�}tj||dd�tj�}tj||dd�|jd�tj |�}|jd�tj |�}|j d ks�t �|j d ks�t �t ||�dS( Ni����(trandomiii�Ridii(ii�i(ii�i( tnumpyR8tseedtrandR1R2R timsaveR3R4tshapetAssertionErrorR(R8tdatat buff_dpi1t buff_dpi100tarr_dpi1t arr_dpi100((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt test_imsaveFs     t image_clipcCs�ddlm}tj�}|jddd�}ddgdd gg}|j|d | || d|df�}|jd �dS( Ni����(tpiiot projectionthammeriiiitextentRE(tmathRFR RRRR(RFRR5tdtim((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyttest_image_clipcs  +Rc Cs�ddl}ddlj}|j�}|jd�jd �}|jd�}|j|dddd�|jd d �|j d d �|j d �dS(Ni����idi ioRRRIiiiiR(i i (iiii( R9tmatplotlib.pyplottpyplotRR R RRtset_xlimtset_ylimR(R R RtarrR5((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt test_imshowps  t__main__targvs-ss--with-doctesttexit(R9R tmatplotlib.testing.decoratorsRRRNROR t nose.toolsRt numpy.testingRR1tosRR/R7RDRMRSt__name__tnoset runmoduleR#(((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt<module>s   -