|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/ |
Upload File : |
� 1&XLc @ s4 d d l Z d d l m Z m Z d d l j Z d d l m Z d d l m Z d d l Z d d l Z e d d g � d � � Z e d d d g d d g d d � d � � Z d � Z d � Z e d d g � d � � Z e d d g � d � � Z e d k r0d d l Z e j d d d g d e � n d S( i����N( t image_comparisont knownfailureif( t assert_raises( t assert_array_equalt baseline_imagest image_interpsc C s� t j d � } | j d d � } t j � } | j d � } | j | d d �| j d � | j d � | j d � } | j | d d �| j d � | j d � } | j | d d �| j d � | j d � d S( s4 make the basic nearest, bilinear and bicubic interpsid i i i7 t interpolationt nearests three interpolationsi8 t bilineari9 t bicubicR N( t npt aranget reshapet pltt figuret add_subplott imshowt set_titlet set_ylabelt savefig( t Xt figt ax1t ax2t ax3( ( sN /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt test_image_interps s s figimage-0s figimage-1t extensionst pngt tolg�~j�t�X?c C s� x�t t f D]�} t j d d d d � } | | _ t j t j d � d t j d � d � \ } } t j | d | d | | � } t j d | d d | d � } | | d } | j | d d d d d d �| j | d d d � d d � f d d d d d d �| j | d d � d d d � f d d d d d d �| j | d d d � d d d � f d d d d d d �| j d t | � d d �q Wd S( s test the figimage methodt figsizei t dpiid g Y@i i2 i t xoi t yot origint lowerNi����s figimage-%d( i i ( t Falset TrueR R t suppressCompositeR t ix_R t sint figimageR t int( R% R t xt yt zt ct img( ( sN /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt test_figimage! s 2##88;c C sh t j � } | j d � } | j d d d g � t j � } | j | � | j d � t j | � d S( Nio i i i i ( R R R t plott cStringIOt StringIOR t seekt imread( R t axt buffer( ( sN /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt test_image_python_io4 s c C s� d d l m } | j d � | j d d � } t j � } t j | | d d �t j � } t j | | d d �| j d � t j | � } | j d � t j | � } | j d k s� t � | j d k s� t � t | | � d S( Ni����( t randomi i i� R id i i ( i i� i ( i i� i ( t numpyR8 t seedt randR1 R2 R t imsaveR3 R4 t shapet AssertionErrorR ( R8 t datat buff_dpi1t buff_dpi100t arr_dpi1t arr_dpi100( ( sN /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt test_imsaveF s t image_clipc C s� d d l m } t j � } | j d d d �} d d g d d g g } | j | d | | | d | d f �} | j d � d S( Ni����( t piio t projectiont hammeri i i i t extentRE ( t mathRF R R R R R ( RF R R5 t dt im( ( sN /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt test_image_clipc s +R c C s� d d l } d d l j } | j � } | j d � j d � } | j d � } | j | d d d d �| j d d � | j d d � | j d � d S( Ni����id i io R R RI i i i i R ( i i ( i i i i ( R9 t matplotlib.pyplott pyplotR R R R R t set_xlimt set_ylimR ( R R R t arrR5 ( ( sN /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt test_imshowp s t __main__t argvs -ss --with-doctestt exit( R9 R t matplotlib.testing.decoratorsR R RN RO R t nose.toolsR t numpy.testingR R1 t osR R/ R7 RD RM RS t __name__t noset runmoduleR# ( ( ( sN /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt <module> s -