%PDF- %PDF-
Mini Shell

Mini Shell

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

�
�9Zc@`s�ddlmZmZmZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
ejddkr�ddlmZnddlmZidej6dej6dej6Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#e#d��Z$e#d��Z%e#d��Z&e'dkr�e
�ndS(i(tdivisiontabsolute_importtprint_functionN(trun_module_suitetassert_tassert_equaltSkipTesti(tStringIOtinfs-inftnancC`s�xIddddgD]5}tt||��tt|��dd|�qW|d�jdkr�tt|d��ttd	��dd|�n)d
}tt|d��|dd|�dS(Niii����g@��x�Dterr_msgs!Failed str formatting for type %sg _�Bit1e10s1e+10(Rtstrtfloattitemsize(ttptxtref((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pytcheck_float_types$$cc`s2x+tjtjtjgD]}t|fVqWdS(s� Check formatting.

        This is only for the str function, and only for simple types.
        The precision of np.float and np.longdouble aren't the same as the
        python float precision.

    N(tnptfloat32tdoublet
longdoubleR(tt((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_float_types"scC`sOxHtjtjtjgD]-}tt||��t|dd|�qWdS(NR
s!Failed str formatting for type %s(RRR	RRt_REF(RR((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pytcheck_nan_inf_float-s cc`s2x+tjtjtjgD]}t|fVqWdS(s� Check formatting of nan & inf.

        This is only for the str function, and only for simple types.
        The precision of np.float and np.longdouble aren't the same as the
        python float precision.

    N(RRRRR(R((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_nan_inf_float2scC`s6x�ddddgD]�}tt||��tt|��dd|�tt||d��tt|d��dd|�tt|||d��tt||d��dd|�qW|d�jd	kr	tt|d��ttd��dd|�n)d
}tt|d��|dd|�dS(Niii����g@��x�DR
s!Failed str formatting for type %sy�?g _�Bis
(1e+10+0j)(RRtcomplexR(RRR((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pytcheck_complex_type=s$,4$cc`s2x+tjtjtjgD]}t|fVqWdS(s�Check formatting of complex types.

        This is only for the str function, and only for simple types.
        The precision of np.float and np.longdouble aren't the same as the
        python float precision.

    N(Rt	complex64tcdoubletclongdoubleR(R((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_complex_typesNscc`s�idttjd�6dtdtj�6dttjd�6dtdtj�6dttjd�6dtdtj�6d	ttjd�6d
tdtj�6dttjd�6dtdtj�6dttjd�6dtdtj�6d
ttjd�6dtdtj�6d
ttjd�6dtdtj�6}xNtjtjtjgD]4}x+|j�D]\}}t|||fVqjWqWWdS(s*Check inf/nan formatting of complex types.s(inf+0j)isinf*js	(-inf+0j)s-inf*js(inf+1j)is	(1+inf*j)s	(-inf+1j)s	(1-inf*j)s(nan+0j)snan*js(nan+1j)s	(1+nan*j)N(	RRRR	RRR titemst_check_complex_inf_nan(tTESTSRtcts((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_complex_inf_nanYs(cC`stt||��|�dS(N(RR(R%R&tdtype((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyR#qscC`s�t�}t�}tj}zC|t_t||��|t_|rSt|�n
t|�Wd|t_Xt|j�|j�dd|�dS(NR
sprint failed for type%s(RtsyststdouttprintRtgetvalue(RRRtfiletfile_tpR*((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyt_test_redirected_printus					

cC`s�x-ddddgD]}tt|�|�qWx;tjtjtjgD] }tt|�|t|�qJW|d�jdkr�ttd�|�nd}ttd�||�dS(Niii����g@��x�Dg _�Bis1e+10(R/R
RRR	RR(RRR((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pytcheck_float_type_print�s cC`s�x-ddddgD]}tt|�|�qW|d�jdkr[ttd�|�nd}ttd�||�tttjd�|d�tttjd�|d	�tttjd�|d
�dS(Niii����g@��x�Dg _�Bis
(1e+10+0j)s(inf+1j)s	(-inf+1j)s(nan+1j)(R/RRRRR	(RRR((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pytcheck_complex_type_print�scc`s2x+tjtjtjgD]}t|fVqWdS(s"Check formatting when using print N(RRRRR0(R((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_float_type_print�scc`s2x+tjtjtjgD]}t|fVqWdS(s"Check formatting when using print N(RRRR R1(R((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_complex_type_print�scC`s�dttjfdttjfddtjfddtjfddtjfddtjfddtjfddtj	fdd	tj
fdd
tjfddtjfddtj
fddtjfddtjfg}tjd
 dkr%|ddtjfddtjfddtjfg7}nx�|D]�\}}}y6t|j|�|j||��d||f�Wq,tk
r�}ttd|t|�t|�t|�f�q,Xq,WdS(s2Test the str.format method with NumPy scalar typess{0}s{0:d}i�iP�I^вl�RU
i����iЊ��ilʈIDl۞s{0:g}g�?iiy�?sfailed with val %s, type %ss=format raised exception (fmt='%s', val=%s, type=%s, exc='%s')N(iiy�?�?y�?�?y�?�?(tTrueRtbool_tFalsetuint8tuint16tuint32tuint64tint8tint16tint32tint64tfloat16Rtfloat64RR)tversion_infoRt
complex128R Rtformatt
ValueErrorRtreprR(tteststfmattvaltvaltypete((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_scalar_format�s4!c`sUtjdkrdg�nddddg���fd�}tjj��|�S(sz
    Swap LC_NUMERIC locale to one in which the decimal point is ',' and not '.'
    If not possible, raise SkipTest

    twin32tFRENCHtfr_FRsfr_FR.UTF-8tfi_FIsfi_FI.UTF-8c`s�tjtj�}z]xI�D]5}ytjtj|�PWqtjk
rPqXqWtd���||�SWdtjtjd|�XdS(Ns5Skipping locale test, because French locale not foundtlocale(RPt	getlocalet
LC_NUMERICt	setlocaletErrorR(targstkwargstcurloctloc(tfunctlocales(sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pytwrapper�s
(R)tplatformtnosettoolstmake_decorator(RYR[((RYRZsN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pytin_foreign_locale�s
cC`s,tttjd��ttd���dS(Ng333333�?(RRRRR
(((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_locale_single�scC`s,tttjd��ttd���dS(Ng333333�?(RRRRR
(((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_locale_double�scC`s,tttjd��ttd���dS(Ng333333�?(RRRRR
(((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyttest_locale_longdouble�st__main__((t
__future__RRRR)RPR]tnumpyRt
numpy.testingRRRRRAtioRRR	RRRRRRR!R'R#tNoneR/R0R1R2R3RKR`RaRbRct__name__(((sN/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_print.pyt<module>s:"%	
								
				!	

Zerion Mini Shell 1.0