%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyo

�
�9Zc@`suddlmZmZmZddlZddlmZddlZddlm	Z	ddl
jjZddl
mZejdd�ejZdefd	��YZed
krqdZdeZd
d
f\ZZx�edd�D]�ZdeZejee�jeed
�Zeje�Zededd�ee de��edededf�q�WndS(i(tdivisiontabsolute_importtprint_functionN(treduce(tfloat_(t
build_err_msgtalltignoretModuleTestercB`s�eZd�Zdded�Zdd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(cC`s~||_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j	|_	t
|_
|j|_|j|_|j
|_
|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_y|j|_Wn tk
rp|jj|_nXg|_dS(N(tmoduletallequaltarangetarraytconcatenatetcounttequaltfilledtgetmasktgetmaskarraytidtinnert	make_masktmaskedtmasked_arrayt
masked_valuestmask_ortnomasktonestoutertrepeattresizetsortttaket	transposetzerostMaskTypetumathtAttributeErrortcoret	testnames(tselfR	((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyt__init__s@		
tcC`s�|j|�}|j|�}|j|j|�|j|��}	|j|j|d|	�|�}|j|j|d|	�|�}|jjdkr�|jt�}t|t	j
�r�|jdkr�d|t	j|�<q�t	j|�r�d}q�n|jjdkrj|jt�}t|t	j
�rO|jdkrOd|t	j|�<qjt	j|�rjd}qjnyI|j
dkp�|j
dkp�|j
|j
k}
|
s�t||g|d|j
|j
fd|dd�}n|||�}|	|jk	r|r|j|d|	�}nt|t�r8|}
dg}
n$|j�}
|
j�}
|
j�}
|
s�d
d|
jd�t|
�}t||g|d|fd|dd�}nWn>tk
r�t||g|d|dd�}t|��nXd
S(sZ
        Assert that a comparison of two masked arrays is satisfied elementwise.

        tmasktOiis
(shapes %s, %s mismatch)theadertnamestxtyidgY@s
(mismatch %s%%)N(((R/R0(R/R0(R/R0(RRRRtdtypetchartastypeRt
isinstancetnptndarraytsizetisnantshapeRRtbooltravelRttolistRtlent
ValueError(R(t
comparisonR/R0terr_msgR-t
fill_valuetxftyftmtcondtmsgtvaltreducedtmatch((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pytassert_array_compare5s^$!!!!0		!	
!cC`s&|j|j||d|dd�dS(sH
        Checks the elementwise equality of two masked arrays.

        R@R-sArrays are not equalN(RJR(R(R/R0R@((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pytassert_array_equalmsc
C`s�tjddddtddddddddg�}d	d
d
d
d
d
d	d
d
d
d
d
g}|j|d|�}|d
dS(
s!
        Tests creation

        g�?g�g@g@g@g$�g$@g@iiR+N(R5RtpiR(R(R/RDtxm((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_0us7*c	
C`s[tjddddtddddddddg�}tjdd	ddd
dd	dddd	dg�}dd
d
d
d
d
dd
d
d
d
d
g}d
d
dd
d
ddd
d
d
d
dg}|j|d|�}|j|d|�}tj|d|�}|jd�|j}xAddgD]3}||_||_||_||_||_q WdS(s!
        Tests creation

        g�?g�g@g@g@g$�g$@g@gg�g�iiR+g@��x�DiiiiN(ii(ii(R5RRLRtwheretset_fill_valueR9(	R(R/R0tm1tm2RMtymRBts((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_1s 73**
						c	C`stjddddg�}|j|dddddg�}|j|dddddg�}|j|�}t|�t|�d|d<d|d<|j||�d|dd+d|dd+|j|d<|j|dd+||(|j|d<|jddddgddddg�|(|jddddgddddg�|(tjd	�d
}|j|d�}|jddddgt	�}tjddddgt	�}|d|ddddddg}|j
|�}|j
|�}|j
|d
d�}dS(s2
        Tests conversions and indexing.

        iiiiR+ii	icig�?g@thellotcopyN(R5RtstrtreprRKRRRRtobjectR(	R(tx1tx2tx3tx4tnRDRRtm3((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_2�s8!!







++c
C`s�|jd�}|j|d<|j|d	�}|j|d
dd�}|j|ddddddddg�|j|ddd�}|jddd�}|jdd�}dS(s&
        Tests resize/repeat

        iiitaxisiiiN(i(iiii(iiii(RRRRRK(R(R^ty4ty5ty6ty7ty8((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_3�s
(cC`s�|jd�}tjd�}|j|dd+|jddd�}|jddd�}|jddd	ddgt�}|j|d<|j|d
ddg�}dS(sB
        Test of take, transpose, inner, outer products.

        iiiiiitabcitdefiN(RR5RtreshapeRRZR (R(R/R0tt((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_4�s!
cC`s�|jd�}|jd�}|jd�}|j|d<|d7}|d7}|jd�}|jd�}|j|d<|d8}|d8}|jd�d}|jd�d}|j|d<|d9}|d9}|jd�d}|jd�d}|j|d<|d}|d}|jd�d}|jd�d}|j|d<|d}||jd�}|j||jd��|jd�jt�}|jd�}|j|d<|d7}dS(s*
        Tests inplace w/ scalar

        i
iig�?g@N(i
(RRRKRR3R(R(R/R0RM((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_5�s@















cC`s�|jddt�}|jd�}|jddt�}|j|d<|j}|jddt�}|j|d<||7}||7}|jddt�}|jddt�}|j|d<|j}|jddt�}|j|d<||8}||8}|jddt�}|jddt�}|j|d<|j}|jddt�}|j|d<||9}||9}|jddt�}|jddt�}|j|d<|j}|jddt�}|j|d<||}||}dS(s)
        Tests inplace w/ array

        i
R1ii����N(RRRR+(R(R/R0RMRDta((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_6"sB
	



	



	



	

cC`sC|jdddtdgddddgdgd�|jdddtdgddddgdgd�f}x�dd	d
ddgD]�}yt|j|�}Wn tk
r�tt|�}nXt|j|�}||j }||�}||�}|j|j	d�|j	d�|�|j|j
|j
�q�Wd
S(sTests ufuncg�?ii����iR+iitsqrttlogtlog10texpt	conjugateN(RRLtgetattrR$R%tfromnumericR	tninRKRt_mask(R(tdtftuftmftargsturtmr((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_7Us7=

%c	C`s�|jddddgdddddg�}|jd|j|dd��|jd|j|d	ddddg��|j|d	ddddgd
d�\}}|jd|�|j|(|jddddgdddddg�}|jdd�}|j|dd�df<|j|j|dd�ddg�|jddg|j|dd��|j|ddd
d�\}}|j|ddg�ddddddg}ddddddgddddddgg}|jd�}|j|j|dd�d
�|j|j|ddd	|�d
�|j|jd�d|jd�g�}|j|j|d�tjj	tjd��dd�|j|j|dd�tjd�dd�|j|j|dd�|j|dd�|j|dd�dg�|j|j|dd	|�d�|j|j|ddd	|�ddddddg�|j|j|dd�|j|dd�|j|dd�dg�|j
d�}ddddddg}	ddddddgddddddgg}
|jd�}ddddddg}|j|j|j||�dd�d
�|j|j|j||	�dd�d
�|j|j|j||�dd�d�|j|j
|j|j||�dd��d�|j||
�}
|j|j|
d�d�|j|j|
dd�ddddddg�|j|j|
dd�d
dg�|j|j|
ddd	|�ddddddg�dS(Ngg�?g@g@R+iiRbtweightstreturnediig@g(@g4@g@g@g$@g�X@g@g@g������
@g������
@(RRKtaverageRRkRtNoneR5taddRR"RRR(R(totttresulttwtstw1tw2R/R0RQRRR`tm4tm5tz((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_99wsN-+-
-%%!0%+90G"7G0+++41%cC`s8|jd�}|j|dd+|jddd�}dS(Niiiiii(RRRk(R(R/((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyttest_A�s(t__name__t
__module__R)tTrueRJRKRNRURaRhRmRnRpR�R�R�(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyRs	"7	
		*			4	3	"	-t__main__sNfrom __main__ import ModuleTester 
import numpy
tester = ModuleTester(module)
simport numpy.ma.core as module
i
iistester.test_%i()s#%ii2t.sModuleTester.test_%i.__doc__score_current : %.3f - %.3f(!t
__future__RRRttimeitt	functoolsRtnumpyR5Rtnumpy.core.fromnumericR&Rwtnumpy.testing.utilsRtseterrRLRZRR�t
setup_baset	setup_curtnrepeattnlooptrangetitfunctTimerRtcurRtprintteval(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/ma/timer_comparison.pyt<module>s*	��

"

Zerion Mini Shell 1.0