KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux server112.speedpacket.com 3.10.0-962.3.2.lve1.5.36.el7.x86_64 #1 SMP Mon May 18 02:16:06 EDT 2020 x86_64
User : equistyl ( 1341)
PHP Version : 8.1.30
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/matplotlib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/matplotlib/image.pyo
�
r`]c@ s�dZddlmZmZddlZddlZddlZddlZddlm	Z	ddl
mZddlj
ZddlmZddljZddljZddljZddljZddljZddlTddlmZmZmZddljZ d	ej!ej"fd
��YZ#de#fd��YZ$d
e$fd��YZ%dej!ej"fd��YZ&dej!ej"fd��YZ'de#fd��YZ(e)d�Z*e)e)e)e)e)dd�Z+d�Z,dde-d�Z.dS(sS
The image module supports basic image loading, rescaling and display
operations.

i����(tdivisiontprint_functionN(tma(trcParams(tallow_rasterization(t*(tBboxBasetBboxtIdentityTransformt_AxesImageBasecB s�eZdZiejd6ejd6ejd6ejd6ejd6ejd6ej	d6ej
d6ejd	6ejd
6ej
d6ejd6ejd
6ejd6ejd6ejd6ejd6ejd6Zegej�D]\ZZeef^q��Zej�Zd�Zd-d-d-d-dded�Z d�Z!d�Z"d�Z#dd�Z$d�Z%e&d��Z'd�Z(d�Z)e*d ��Z+d!�Z,ed"�Z-d#�Z.d$�Z/d%�Z0d&�Z1d'�Z2d(�Z3d)�Z4d*�Z5d+�Z6d,�Z7RS(.itnonetnearesttbilineartbicubictspline16tspline36thanningthammingthermitetkaisertquadrictcatromtgaussiantbesseltmitchelltsinctlanczostblackmancC sdt|jjj�S(NsAxesImage(%g,%g;%gx%g)(ttupletaxestbboxtbounds(tself((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt__str__=sig@c	
K s�tjj|�tjj|||�|dkr?td}n||_|j|�|j	|�||_
|j|�|j|�||_
d|_d|_|j|	�dS(s�
        interpolation and cmap default to their rc settings

        cmap is a colors.Colormap instance
        norm is a colors.Normalize instance to map luminance to 0-1

        extent is data axes (left, right, bottom, top) for making image plots
        registered with data plots.  Default is to label the pixel
        centers with the zero-based row and column indices.

        Additional kwargs are matplotlib.artist properties

        simage.originN(tmartisttArtistt__init__tcmtScalarMappabletNoneRtorigintset_filternormt
set_filterradt
_filterradtset_interpolationtset_resampleRt_imcachet_image_skew_coordinatetupdate(
R taxtcmaptnormt
interpolationR(t
filternormt	filterradtresampletkwargs((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR$@s
	

	

			cC s,|jdkrtd��n|jjd S(s+Get the numrows, numcols of the input images"You must first set the image arrayiN(t_AR'tRuntimeErrortshape(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytget_sizenscC s tjj||�d|_dS(sw
        Set the alpha value used for blending - not supported on
        all backends

        ACCEPTS: float
        N(R"R#t	set_alphaR'R.(R talpha((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR=uscC s&d|_d|_tjj|�dS(sb
        Call this whenever the mappable is changed so observers can
        update state
        N(R'R.t
_rgbacacheR%R&tchanged(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR@s		g�?cC std��dS(Ns)The make_image method must be overridden.(R:(R t
magnification((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt
make_image�scC sK|\}}}}||}||}	|jdkrJ|dkrJd}
n
||j}
|jdkr{|	dkr{d}n
|	|j}|jd \}}
|
dkr\|j|||
}tdt||j��}|j|||
}t|
t||j��}t	||�}|}||||
}||||
}||}||j}
nt	d|
�}|dkrU|j
||	|}tdt||j��}|j||	|}t|t||j��}|jdkrt	||||�}nt	||�}|}|||	|}|||	|}||}	|	|j}nt	d|�}||j
ks�||jkr�d|_||_
||_n|jdkr)|jjtjkr
|jjdkr
tj|j||dd�fd�}t|_n�|jdkr�|j|jdt�}tj||j�rU|j�}n|d	dd�fc|d	dd
�f9<|djtj�}||_n	|j}tj|||dd�fd�}|jjdkr�|jj �|_n	t|_||_|jdkr2|j!�q2n	|j}|||||	|
|fS(s
        convert numpy array A with given extents ([x1, x2, y1, y2] in
        data coordinate) into the Image, given the viewlim (should be a
        bbox instance).  Image will be clipped if the extents is
        significantly larger than the viewlim.
        gg�?iitupperiNtbytes.ii�("twidththeightR;tx0tmaxtintR+tx1tmintslicety0ty1R(t
_oldxslicet
_oldysliceR'R.R9tdtypetnptuint8tndimt_imagetfrombytetFalsetis_grayscaleR?tto_rgbatmay_share_memorytcopytastypeR2tis_grayt	flipud_in(R tAt
image_extentstviewlimtxmintxmaxtymintymaxtdxintvtdyintvtsxtsytnumrowstnumcolsRGtix0RJtix1txslicetxmin_oldRMtiy0RNtiy1tyslicetymin_oldtimtx((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt_get_unsampled_image�sz

	
	


		'(,	%			cC s,tj�}|j||�|j||f�\}}|j||f�\}	}
d||
||	tj|
|g|	|gg�}|tj|g|gg�j\}}
|tj|gdgg�j\}}tjj|||
|dd�}||tj�j||�j�j	�}|S(sh
        Retuen a transform that does
         (x1, y1) -> (x1, y1)
         (x2, y2) -> (x2, y2)
         (x2, y1) -> (x3, y3)

        It was intended to derive a skew transform that preserve the
        lower-left corner (x1, y1) and top-right corner(x2,y2), but
        change the the lower-right-corner(x2, y1) to a new position
        (x3, y3).
        g�?i(
tmtransformstAffine2Dt	translatettransform_pointRRtmattflattfrom_valuestinvertedt
get_affine(RJRNtx2ty2tx3ty3ttr1tx2aty2atx3aty3atinv_mattatbtctdttr2ttr((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt_get_rotate_and_skew_transform�s
7((!,c+C s�|j�}|j�\}}}}|jtj||f||fg��}|d\}	}
|d\}}|	||
|f}
|jr�|j\}}|jtj||fg��}|d\}}|j|	|
||||�}|}n	t�}|jj	j
\}}}}|j�}|jtj||f||f||f||fg��}t|dd�df�t
|dd�df�}}t|dd�df�t
|dd�df�}}tj||||�}|j|j|
|�\} }!}"}#}$}%}&| dkr#dS|jjj�}'tjj|'d�}(| j|(�| j�| j�\})}*| j|*|)�|j�| _|j�| _|j ||!|"| |#|$|�dS(su
        draw unsampled image. The renderer should support a draw_image method
        with scale parameter.
        iiN(!t
get_transformt
get_extentt	transformRRtarrayR/R�RRRtextentsR~RKRHRtfrom_extentsRvR9R'tpatcht
get_facecolortmcolorstcolorConverterRYtset_bgtreset_matrixR<tresizetget_urlt_urltget_gidt_gidt
draw_image(+R trenderertgcttranstx_llctx_trcty_llcty_trctxyt_xx1t_yy1t_xx2t_yy2textent_in_ictx_lrcty_lrctxy2t_xx3t_yy3ttr_rotate_skewttrans_ic_to_canvasRJRNR�R�ttrans_canvas_to_ictxy_tx1_tx2_ty1_ty2_t
viewLim_in_icRtRbRdRfRgRhRitfctbgRjRk((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt_draw_unsampled_imagesL
	!				99-

cC stS(s{
        return True if the image is better to be drawn unsampled.
        The derived class needs to override it.
        (RW(R R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt_check_unsampled_imageNsc
O sX|j�sdS|jj�dks:|jj�dkrJtjd�n|jjj\}}}}|j�}|j	|jjj
��|j|j��|j
|j��|j|�r�|j||�nx|jdk	r�tjd�n|j|j��}	|	dkrdS|j�|	_|j�|	_|j||||	�|j�dS(Ntlinears,Images are not supported on non-linear axes.s4Image will not be shown correctly with this backend.(tget_visibleRt
get_xscalet
get_yscaletwarningstwarnRRtnew_gctset_clip_rectangletfrozent
set_clip_patht
get_clip_pathR=t	get_alphaR�R�R/R'RBtget_image_magnificationR�R�R�R�R�trestore(
R R�targsR8tlR�twidthDisplayt
heightDisplayR�Rt((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytdrawUs*c	C s�t|j�r|j||�S|j|j}}|j�\}}}}||krf||}}n||kr�||}}n|dk	r�|dk	r�||ko�||ko�||ko�||k}nt}|ifS(sH
        Test whether the mouse event occured within the image.
        N(tcallablet	_containstxdatatydataR�R'RW(	R t
mouseeventRutyRbRcRdRetinside((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytcontainsps3c	C s�|j�}|dkrdS|r^|j�\}}|j�|jd�|j||�n|j�|j�\}}}tj	||||�dS(s&Write the image to png file with fnameNi(
RBR'R<R�R,R�t
flipud_outtas_rgba_strt_pngt	write_png(	R tfnametnoscaleRtRjRktrowstcolstbuffer((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��s


cC s�t|d�r!t|�|_ntj|�|_|jjtjkrstj|jjtj	�rst
d��n|jjd	ks�|jjdkr�|jjdd
kr�t
d��nd|_d|_d|_d|_dS(sI
        Set the image array

        ACCEPTS: numpy/PIL Image A
        tgetpixels#Image data can not convert to floatiii����is!Invalid dimensions for image dataN(ii(ii(thasattrtpil_to_arrayR9tcbooktsafe_masked_invalidRQRRRStcan_casttfloatt	TypeErrorRTR;R'R.R?RORP(R R_((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytset_data�s1(			cC s|j|�dS(sq
        Retained for backwards compatibility - use set_data instead

        ACCEPTS: numpy array A or PIL ImageN(R�(R R_((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt	set_array�s	cC s|jS(s*
        Return the interpolation method the image uses when resizing.

        One of 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning',
        'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian',
        'bessel', 'mitchell', 'sinc', 'lanczos', or 'none'.

        (t_interpolation(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytget_interpolation�s	cC sP|dkrtd}n|j�}||jkrCtd��n||_dS(s7
        Set the interpolation method the image uses when resizing.

        if None, use a value from rc setting. If 'none', the image is
        shown as is without interpolating. 'none' is only supported in
        agg, ps and pdf backends and will fall back to 'nearest' mode
        for other backends.

        ACCEPTS: ['nearest' | 'bilinear' | 'bicubic' | 'spline16' |
          'spline36' | 'hanning' | 'hamming' | 'hermite' | 'kaiser' |
          'quadric' | 'catrom' | 'gaussian' | 'bessel' | 'mitchell' |
          'sinc' | 'lanczos' | 'none' |]

        simage.interpolationsIllegal interpolation stringN(R'Rtlowert_interpdt
ValueErrorR�(R ts((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR,�s
cC s&|dkrtd}n||_dS(sZ
        Set whether or not image resampling is used

        ACCEPTS: True|False
        simage.resampleN(R'Rt	_resample(R tv((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR-�s
cC s|jS(s!Return the image resample boolean(R�(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytget_resample�scC s|rd|_n	d|_dS(sy
        Set whether the resize filter norms the weights -- see
        help for imshow

        ACCEPTS: 0 or 1
        iiN(t_filternorm(R R5((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR)�scC s|jS(sReturn the filternorm setting(R�(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytget_filternorm�scC st|�}||_dS(s�
        Set the resize filter radius only applicable to some
        interpolation schemes -- see help for imshow

        ACCEPTS: positive float
        N(R�R+(R R6tr((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR*�scC s|jS(sreturn the filterrad setting(R+(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt
get_filterradsN(8t__name__t
__module__tzorderRUtNEARESTtBILINEARtBICUBICtSPLINE16tSPLINE36tHANNINGtHAMMINGtHERMITEtKAISERtQUADRICtCATROMtGAUSSIANtBESSELtMITCHELLtSINCtLANCZOStBLACKMANR�tdictt	iteritemstkR�t	_interpdrtkeystinterpnamesR!R'RWR$R<R=R@RBRvtstaticmethodR�R�R�RR�R�R�R�R�R�R,R-R�R)R�R*R�(((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR	 sf

















1	'		
			X	N												t	AxesImagec	B sYeZd�Zd	d	d	d	d	dded�Zdd�Zd�Zd�Zd�Z	RS(
cC sdt|jjj�S(NsAxesImage(%g,%g;%gx%g)(RRRR(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR!sig@c
K sJ||_tj||d|d|d|d|d|d|d|	|
�dS(	s�
        interpolation and cmap default to their rc settings

        cmap is a colors.Colormap instance
        norm is a colors.Normalize instance to map luminance to 0-1

        extent is data axes (left, right, bottom, top) for making image plots
        registered with data plots.  Default is to label the pixel
        centers with the zero-based row and column indices.

        Additional kwargs are matplotlib.artist properties

        R2R3R4R(R5R6R7N(t_extentR	R$(R R1R2R3R4R(textentR5R6R7R8((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR$
s	g�?c"C s�|jdkrtd��n|j�\}}}}|j�}|jtj||f||fg��}|d\}}	|d\}
}tj	|j
j|�}|j|j||
|	|g|�\}
}}}}}}|j
j
j�}tjj|d�}|
j|�|
j�|
j�\}}|dksE|dkrIdS|
j|j|j�|
j|j�|dkr�d}n||j||}|dkr�d}n||j||}|
j||�|j
jj\}}}}t||�dt||�d}t||�dt||�d}||} ||}!|
j | ||!|�|
j!t"|d�t"|d�d|j#d|j$�|
S(Ns9You must first set the image array or the image attributeiigg�?R3tradius(%R9R'R:R�R�R�RRR�RwtTransformedBboxRtviewLimRvR�R�R�R�RYR�R�R<R,R�R�R-R�RGRMtapply_translationRR�troundt
apply_scalingR�RIR�R+("R RARJR�RNR�R�R�t_x1t_y1t_x2t_y2ttransformed_viewLimRtRbRdRfRgRhRiR�R�RjRkttxttyR�R�R�ttR�R�trxtry((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRB2sJ	

		&&

#cC s=|j�dkr9|j�r"tStjd|j�ntS(sK
        return True if the image is better to be drawn unsampled.
        R
skThe backend (%s) does not support interpolation='none'. The image will be interpolated with 'nearest` mode.(R�toption_scale_imagetTrueR�R�t	__class__RW(R R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR�ls
cC s�||_|\}}}}||f||ff}|jj|�|jjrn|jj||fdd�n|jjr�|jj||fdd�ndS(sc
        extent is data axes (left, right, bottom, top) for making image plots

        This updates ax.dataLim, and, if autoscaling, sets viewLim
        to tightly fit the image, regardless of dataLim.  Autoscaling
        state is not changed, so following this with ax.autoscale_view
        will redo the autoscaling in accord with dataLim.

        tautoN(RRtupdate_datalimt
_autoscaleXontset_xlimR't
_autoscaleYontset_ylim(R RRbRcRdRetcorners((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt
set_extentxs
	cC sq|jdk	r|jS|j�}|\}}|jdkrUd|d|ddfSd|dd|dfSdS(s.Get the image extent: left, right, bottom, topRCg�g�?N(RR'R<R((R tszRjRk((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��sN(
R�R�R!R'RWR$RBR�R5R�(((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRs	 :		tNonUniformImagecB sneZd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�ZRS(cK s6|jdd�}tj|||�|j|�dS(s�
        kwargs are identical to those for AxesImage, except
        that 'interpolation' defaults to 'nearest', and 'bilinear'
        is the only alternative.
        R4RN(tpopRR$R,(R R1R8tinterp((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR$�scC stS(s;
        return False. Do not use unsampled image.
        (RW(R R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��sg�?cC s�|jdkrtd��n|j}t|j�dkr�|jtjkrx|j|dt	�}|j
j�|_q�tj
|dd�dd�tjfdd�}d|dd�dd�df<t	|_n�|jtjkr�d|jtj�}n|jddkr�tjtt|jdd!�dg�tj�}||dd�dd�dd�f<d|dd�dd�df<|}nt|_|jjj\}}}}|jjj\}}	}
}t|
�dt|�d}t|�dt|	�d}
||9}|
|9}
tj|j|j||
|||||||f|j|j�}|jj j!�}t"j#j|d�}|j$|�|j|_|S(	Ns"You must first set the image arrayiRDii�iig�?(%R9R'R:tlenR;RQRRRSRYR,R2R]RXtrepeattnewaxisR\tzerosRtlistRWRRRRR�RRUtpcolort_Axt_AyR�R�R�R�R�R�R�(R RAR_tBRGRMtv_widthtv_heightR�R�R�R(RERFRtR�R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRB�sB	12%		


cC sotj|tj�}tj|tj�}tj|�}t|j�dks�t|j�dks�|jdd!|jd|jdfkr�td��nt|j�d
kr�td��nt|j�dkr�|jddkr�td��nt|j�dkr5|jddkr5|jdd!|_n||_||_	||_
d	|_d	|_
d	|_d	S(sT
        Set the grid for the pixel centers, and the pixel values.

          *x* and *y* are 1-D ndarrays of lengths N and M, respectively,
             specifying pixel centers

          *A* is an (M,N) ndarray or masked array of values to be
            colormapped, or a (M,N,3) RGB array, or a (M,N,4) RGBA
            array.
        iiisAxes don't match array shapeisCan only plot 2D or 3D datais?3D arrays must have three (RGB) or four (RGBA) color componentsN(ii(iii(RRtasarraytfloat32R�R�R:R;R�R9R@RAR'R.RORP(R RuR�R_((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��s$**((					cG std��dS(NsMethod not supported(tNotImplementedError(R R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��scC s;|dkr'|dkr'td��ntj||�dS(NRRs?Only nearest neighbor and bilinear interpolations are supported(snearestsbilinear(R'RGRR,(R R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR,�scC sJ|jdkrtd��n|jd|jd|jd|jdfS(NsMust set data firstii����(R9R'R:R@RA(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR�scC sdS(N((R R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR)scC sdS(N((R R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR*	scC s5|jdk	rtd��ntjj||�dS(Ns'Cannot change colors after loading data(R9R'R:R%R&tset_norm(R R3((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRHscC s5|jdk	rtd��ntjj||�dS(Ns'Cannot change colors after loading data(R9R'R:R%R&tset_cmap(R R2((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRIs(
R�R�R$R�RBR�R�R,R�R)R*RHRI(((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR7�s		)	#						tPcolorImagecB seeZdZd	d	d	d	d	d�Zdd�Zd�Zed��Zd�Z	d�Z
d�ZRS(
s�
    Make a pcolor-style plot with an irregular rectangular grid.

    This uses a variation of the original irregular image code,
    and it is used by pcolorfast for the corresponding grid type.
    cK s\tjj|�tjj|||�||_d|_|j|�|j	|||�dS(s�
        cmap defaults to its rc setting

        cmap is a colors.Colormap instance
        norm is a colors.Normalize instance to map luminance to 0-1

        Additional kwargs are matplotlib.artist properties

        N(
R"R#R$R%R&RR'R?R0R�(R R1RuR�R_R2R3R8((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR$s		
g�?c

C s�|jdkrtd��n|jjj�}tjj|d�}t	j
|�djt	j�}|jj
j\}}}}t|�dt|�d}t|�dt|�d}	||}|	|}	|jdkr)|j|jdt�}
|
|_|jjdkr2|jj�|_q2n	|j}
|jj}tj|j|j|
|	||j|j|j|jf|�}|j|_|S(Ns"You must first set the image arrayii�g�?RDi(R9R'R:RR�R�R�R�RYRRR�R\RSRR�RR?R,RTR2R]RXRRUtpcolor2R@RARGRJRMRN(
R RAR�R�R�R�R�R(RERFR_tvlRt((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRB8s0

			cC sd|_tjj|�dS(N(R'R?R%R&R@(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR@Ss	cO s�|j�sdS|j|j��}|j�}|j|jjj��|j|j	��|j
|j��|j|t
|jjj�t
|jjj�|�|j�dS(N(R�RBR�R�R�RRR�R�R�R=R�R�RRbRdR�(R R�R�R8RtR�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR�Ws	cC sXtj|�}|dkrDtjd|jdddtj�}ntj|tj�j�}|dkr�tjd|jdddtj�}ntj|tj�j�}|jd |j	d|j	dfkrt
|j�t
|j	�t
|j	�td��n|jd
kr*td��n|jdkr_|jddkr_|jd |_nt
|_|jdkr0|jddkr!|dd�dd�df|dd�dd�dfkj�r-|dd�dd�df|dd�dd�dfkj�r-t|_q-q0td	��n||_||_||_d|_dS(NiiRQisAxes don't match array shapeisA must be 2D or 3Dis+3D arrays must have RGB or RGBA as last dim(ii(ii(R�R�R'RRtarangeR;tfloat64REtraveltsizetprintR�RTRWRXtallR,R9R@RAR?(R RuR�R_((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR�gs4))'


"	�			cG std��dS(NsMethod not supported(RG(R R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��scC s$tjj||�t|jd<dS(sw
        Set the alpha value used for blending - not supported on
        all backends

        ACCEPTS: float
        R�N(R"R#R=R,tupdate_dict(R R>((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR=�sN(R�R�t__doc__R'R$RBR@RR�R�R�R=(((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRJs		 	tFigureImagecB sweZdZdddddd�Zd�Zd�Zd�Zd�Zd�Z	dd�Z
ed	��Zd
�Z
RS(icK s}tjj|�tjj|||�|dkr?td}n||_||_||_	||_
|j|�d|_dS(s�
        cmap is a colors.Colormap instance
        norm is a colors.Normalize instance to map luminance to 0-1

        kwargs are an optional list of Artist keyword args
        simage.origing�?N(
R"R#R$R%R&R'RR(tfiguretoxtoyR0RA(R tfigR2R3toffsetxtoffsetyR(R8((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR$�s
				
c	C s�t|j�r|j||�S|j�\}}}}|j|j}}|dk	r�|dk	r�||ko�||ko�||ko�||k}nt}|ifS(s6Test whether the mouse event occured within the image.N(R�R�R�RuR�R'RW(	R R�RbRcRdReR�R�R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��s3cC s,|jdkrtd��n|jjd S(s+Get the numrows, numcols of the input images"You must first set the image arrayiN(R9R'R:R;(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR<�scC sF|j�\}}d|j|d|jd|j|d|jfS(s.Get the image extent: left, right, bottom, topg�g�?(R<RWRX(R RjRk((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��scC s tjj|tj|��dS(sSet the image array.N(R%R&R�R�R�(R R_((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��scC s|j|�dS(s@Deprecated; use set_data for consistency with other image types.N(R�(R R_((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��sg�?c	C s9|jdkrtd��n|j|jdt�}||_|dk}|rZd}nd}tj||�}|jj	�}|j
tjj|d��|j
jdko�t|jj�dk|_|r|j�\}}||9}||9}|jtj�|j||�n|jdkr5|j�n|S(Ns"You must first set the image arrayRDiitgrayiRC(R9R'R:RYR,RARURVRVR�R�R�R�R2tnameR:R;RXR<R,RR�R(R�(	R RARutismagtisoutputRtR�RjRk((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRB�s,		


cO s�|j�sdS|j|j��}|j�}|j|jj�|j|j��|j	|j
��|j|t|j
�t|j�|�|j�dS(N(R�RBR�R�R�RVRR�R�R=R�R�RRWRXR�(R R�R�R8RtR�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��s(cC s;|j�}|j�\}}}tj||||�dS(s&Write the image to png file with fnameN(RBR�R�R�(R R�RtR�R�R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��sN(R�R�R�R'R$R�R<R�R�R�RBRR�R�(((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRU�s	
				t	BboxImagec	B sheZdZd
d
d
d
ddeed�Zd
d�Zd�Zd�Z	dd�Z
ed	��ZRS(s;The Image class whose size is determined by the given bbox.ig@c
K sVtj|dd	d|d|d|d|d|d|d||
�||_|	|_d	S(
s?
        cmap is a colors.Colormap instance
        norm is a colors.Normalize instance to map luminance to 0-1

        interp_at_native is a flag that determines whether or not interpolation should
        still be applied when the image is displayed at its native resolution.  A common
        use case for this is when displaying an image for annotational purposes; it is
        treated similarly to Photoshop (interpolation is only used when displaying the
        image at non-native resolutions).


        kwargs are an optional list of Artist keyword args

        R1R2R3R4R(R5R6R7N(R	R$R'Rtinterp_at_native(R RR2R3R4R(R5R6R7RaR8((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR$s	cC sc|dkr|j�j}nt|jt�r7|jSt|j�rS|j|�Std��dS(Nsunknown type of bbox(R't
get_figuret_cachedRenderert
isinstanceRRR�R�(R R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytget_window_extent,s
cC sjt|j�r|j||�S|j�s5tifS|j|j}}|j�j||�}|ifS(s6Test whether the mouse event occured within the image.(R�R�R�RWRuR�ReR�(R R�RuR�R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR�7s
cC s,|jdkrtd��n|jjd S(s+Get the numrows, numcols of the input images"You must first set the image arrayiN(R9R'R:R;(R ((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR<Dsg�?c
C s]|jdkrtd��n|jdkr'|jjtjkr{t|jj�dkr{t	j
|jd�}t|_n�|j
dkr�|j|jdt�}||_
n	|j
}t	j
|d�}t|jj�dkr�|jj�|_n	t|_||_|jdkr0|j�q0n	|j}|j�|j|j|j�|j|j�|j|�j\}}}}t|�t|�}	t|�t|�}
|	|9}	|
|9}
|jjd \}}|jr|	|kr|
|kr|jd�n|	|}
|
|}|j|
|�|jt |	�t |
�d|j!d|j"�|S(	Ns9You must first set the image array or the image attributeiiRDiRCR3R(#R9R'R:R.RQRRRSR:R;RURVRWRXR?RYR,R2R]R(R^R�R,R�R�R-R�ReR�RRaR R�RIR�R+(R R�RARtRuR�R�R�R(R�R�RjRkR)R*((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyRBKsF-				


"

cO s�|j�sdS|j�}|j||�}|j|�j\}}}}	|j�}
|j|
�|
j|j��|j	|
t
|�t
|�|�|
j�dS(N(R�R�RBReR�R�t_set_gc_clipR=R�R�RR�(R R�R�R8t	image_magRtR�R�R�R(R�((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��s
"N(
R�R�RTR'RWR,R$ReR�R<RBRR�(((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR`s 	
	7c	C s>d�}itjd6}|dkr�tj|�r_tjj|�\}}|j�d}q�t	|d�r�tjj|j
�\}}|j�d}q�d}n|}||j�kr�||�}|dkr�td|j
���n|S||}tj|�r0t|d��}||�SWdQXn
||�SdS(s
    Read an image from a file into an array.

    *fname* may be a string path or a Python file-like object.  If
    using a file object, it must be opened in binary mode.

    If *format* is provided, will try to read file of that type,
    otherwise the format is deduced from the filename.  If nothing can
    be deduced, PNG is tried.

    Return value is a :class:`numpy.array`.  For grayscale images, the
    return array is MxN.  For RGB images, the return value is MxNx3.
    For RGBA images the return value is MxNx4.

    matplotlib can only read PNGs natively, but if `PIL
    <http://www.pythonware.com/products/pil/>`_ is installed, it will
    use it to load the image and return an array (if possible) which
    can be used with :func:`~matplotlib.pyplot.imshow`.
    cS s�yddlm}Wntk
r(dSXtj|�rlt|d�� }|j|�}t|�SWdQXn|j|�}t|�SdS(s-try to load the image with PIL or return Nonei����(tImagetrbN(tPILRhtImportErrorR'R�tis_string_liketopenR�(R�Rhtfhtimage((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytpilread�s
tpngiR]s\Only know how to handle extensions: %s; with PIL installed matplotlib can handle more imagesRiN(R�tread_pngR'R�RltostpathtsplitextR�R�R]titerkeysR�RRm(	R�tformatRpthandlerstbasenametextRtthandlertfd((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytimread�s*		
idc
C s�ddlm}ddlm}	g|jd|jdfD]}
|
t|�^q;}|	d|d|dt�}||�}
|j|d	|d
|d|d|�}|j|d|d
|�dS(s
    Save an array as in image file.

    The output formats available depend on the backend being used.

    Arguments:
      *fname*:
        A string containing a path to a filename, or a Python file-like object.
        If *format* is *None* and *fname* is a string, the output
        format is deduced from the extension of the filename.
      *arr*:
        An MxN (luminance), MxNx3 (RGB) or MxNx4 (RGBA) array.
    Keyword arguments:
      *vmin*/*vmax*: [ None | scalar ]
        *vmin* and *vmax* set the color scaling for the image by fixing the
        values that map to the colormap color limits. If either *vmin* or *vmax*
        is None, that limit is determined from the *arr* min/max value.
      *cmap*:
        cmap is a colors.Colormap instance, eg cm.jet.
        If None, default to the rc image.cmap value.
      *format*:
        One of the file extensions supported by the active
        backend.  Most backends support png, pdf, ps, eps and svg.
      *origin*
        [ 'upper' | 'lower' ] Indicates where the [0,0] index of
        the array is in the upper left or lower left corner of
        the axes. Defaults to the rc image.origin value.
      *dpi*
        The DPI to store in the metadata of the file.  This does not affect the
        resolution of the output image.
    i����(tFigureCanvasAgg(tFigureiitfigsizetdpitframeonR2tvmintvmaxR(RwN(	tmatplotlib.backends.backend_aggR~tmatplotlib.figureRR;R�RWtfigimagetsavefig(R�tarrR�R�R2RwR(R�tFigureCanvasRRuR�RYtcanvasRt((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pytimsave�s!7'cC s�tjd�}|jdkr'|}n/|jdkri|}||�}|jd|jdf|_|S|jdkr�|}||�}|jd|jddf|_|S|jjd	�r#|}|jjd
�r�||d�}n||d�}|jd|jdf|_|jd
�Sy|jd�}Wnt	k
rUt
d��nX||�}|jd|jddf|_|S(s�
    Load a PIL image and return it as a numpy array.  For grayscale
    images, the return array is MxN.  For RGB images, the return value
    is MxNx3.  For RGBA images the return value is MxNx4
    cS s+|jd|j�}tj||�}|S(sTeturn a 1D array of dtype.traw(ttostringtmodeRRt
fromstring(RtRQtx_strRu((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyttoarraystRGBAtRGBXtLiitRGBisI;16RBs>u2s<u2s=u2sUnknown image modei(R�R�(RRRSR�RPR;t
startswithtendswithR\tconvertR�R:(tpilImageR�RtRu((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyR��s6	 

 g�������?Rc
C s�tjj|�\}}tjj|�\}}t|�}	|	j\}
}}d}
t|
�|
|}t|�|
|}|j�}|r�ddlj	}|j
d||fd|
�}n�|dkr�ddlm}nJ|dkr�dd	l
m}n+|d
krddlm}ntd��dd
lm}|d||fd|
�}||�}|jddddgdddtdgdg�}tjj|�\}}|j|	dddtdd�|j|d|
�|S(s�
    make a thumbnail of image in *infile* with output filename
    *thumbfile*.

      *infile* the image file -- must be PNG or PIL readable if you
         have `PIL <http://www.pythonware.com/products/pil/>`_ installed

      *thumbfile*
        the thumbnail filename

      *scale*
        the scale factor for the thumbnail

      *interpolation*
        the interpolation scheme used in the resampling


      *preview*
        if True, the default backend (presumably a user interface
        backend) will be used which will cause a figure to be raised
        if :func:`~matplotlib.pyplot.show` is called.  If it is False,
        a pure image backend will be used depending on the extension,
        'png'->FigureCanvasAgg, 'pdf'->FigureCanvasPdf,
        'svg'->FigureCanvasSVG


    See examples/misc/image_thumbnail.py.

    .. htmlonly::

        :ref:`misc-image_thumbnail`

    Return value is the figure instance containing the thumbnail

    idi����NR�R�s.png(R~s.pdf(tFigureCanvasPdfs.svg(tFigureCanvasSVGs0Can only handle extensions 'png', 'svg' or 'pdf'(RiitaspectR.R�txtickstyticksR7R4R(RsRttsplitRuR}R;R�R�tmatplotlib.pyplottpyplotRVR�R~tmatplotlib.backends.backend_pdfR�tmatplotlib.backends.backend_svgR�R�R�Rtadd_axesRWtimshowR,R�(tinfilet	thumbfiletscaleR4tpreviewtbasedirRytbaseouttextoutRtR�R�tdepthR�RFREt	extensiontpltRYR�RR�R1Rz((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt	thumbnail.s4%!3(/RTt
__future__RRRsR�tmathtnumpyRRRt
matplotlibRtmatplotlib.artisttartistR"Rtmatplotlib.colorstcolorsR�t
matplotlib.cmR%tmatplotlib.cbookR�tmatplotlib._imageRUtmatplotlib._pngR�tmatplotlib.transformsRRRt
transformsRwR#R&R	RR7RJRUR`R'R}R�R�RWR�(((s6/usr/lib64/python2.7/site-packages/matplotlib/image.pyt<module>s:
���{~n�C*	/

Anon7 - 2021