• File: test_image.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyc
  • Date Modified: 07/22/2015 11:41 PM
  • File size: 4.61 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

1&XLc@s4ddlZddlmZmZddljZddlm	Z	ddl
mZddlZddl
Z
eddgdZeddd	gd
dgdd
dZdZdZeddgdZeddgdZedkr0ddlZejdddgdendS(iN(timage_comparisontknownfailureif(t
assert_raises(tassert_array_equaltbaseline_imagest
image_interpscCstjd}|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(
tnptarangetreshapetplttfiguretadd_subplottimshowt	set_titlet
set_ylabeltsavefig(tXtfigtax1tax2tax3((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyttest_image_interpss



s
figimage-0s
figimage-1t
extensionstpngttolg~jtX?c	CsxttfD]}tjdddd}||_tjtjddtjdd\}}tj|d|d||}tjd|dd|d}||d}|j	|d	d
dd
dd
|j	|dddddfd	d
dddd
|j	|dddddfd	ddd
dd
|j	|ddddddfd	ddddd
|j
dt|ddq
WdS(stest the figimage methodtfigsizeitdpiidgY@ii2itxoityotorigintlowerNisfigimage-%d(ii(tFalsetTrueR
RtsuppressCompositeR
tix_RtsintfigimageRtint(R%Rtxtytztctimg((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyt
test_figimage!s	2##88;cCshtj}|jd}|jdddgtj}|j||jdtj|dS(Nioiiii(	R
RRtplott	cStringIOtStringIORtseektimread(Rtaxtbuffer((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyttest_image_python_io4s

cCsddlm}|jd|jdd}tj}tj||ddtj}tj||dd|jdtj	|}|jdtj	|}|j
d
kst|j
dkstt||dS(Ni(trandomiiiRidii(iii(iii(
tnumpyR8tseedtrandR1R2R
timsaveR3R4tshapetAssertionErrorR(R8tdatat	buff_dpi1tbuff_dpi100tarr_dpi1t
arr_dpi100((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyttest_imsaveFs


t
image_clipcCsddlm}tj}|jddd}ddgdd	gg}|j|d
|||d|df}|jddS(Ni(tpiiot
projectionthammeriiiitextentRE(tmathRFR
RRRR(RFRR5tdtim((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyttest_image_clipcs+Rc	Csddl}ddlj}|j}|jdjd
}|jd}|j|dddd|jd
d|j	d
d|j
ddS(Niidi
ioRRRIiiiiR(i
i
(iiii(R9tmatplotlib.pyplottpyplotRRRRRtset_xlimtset_ylimR(R
R
RtarrR5((sN/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tests/test_image.pyttest_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-