%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyc

�
�9Zc@`s�ddlmZmZmZddlZddlZddlmZddl	m
Z
mZmZm
Z
defd��YZde
fd��YZd	e
fd
��YZddd��YZd
�Zedkr�e�ndS(i(tdivisiontabsolute_importtprint_functionN(tsixu(tTestCasetrun_module_suitetassert_tassert_equalt
TestArrayReprcB`seZd�ZRS(cC`s2tjtjtjg�}tt|�d�dS(Nsarray([ nan,  inf])(tnptarraytnantinfRtrepr(tselftx((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyttest_nan_inf
s(t__name__t
__module__R(((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyRstTestComplexArraycB`seZd�ZRS(clC`s"dddtjtjtjg}g|D]"}|D]}t||�^q3q)}tjtjtjg}g|D].}|D]!}ttj|g|��^qzqp}ddddddddd	d
d
dddd
dddddddddddddddddddddddddddd d d!d"d"d#d$d$d%d&d&d'd(d(d)d*d*d+d,d,d-d.d.d.d/d/d/d0d0d0d1d1d2d3d3d4d5d5d6d7d7d7d8d8d8d9d9d9d:d:d;d<d<d=d>d>d?d@d@d@dAdAdAdBdBdBgl}	x-t	||	�D]\}
}t
|
|k�q�WdS(CNiii����s	[ 0.+0.j]s[ 0.0+0.0j]s	[ 0.+1.j]s[ 0.0+1.0j]s	[ 0.-1.j]s[ 0.0-1.0j]s
[ 0.+infj]s[ 0.0+infj]s
[ 0.-infj]s[ 0.0-infj]s
[ 0.+nanj]s[ 0.0+nanj]s	[ 1.+0.j]s[ 1.0+0.0j]s	[ 1.+1.j]s[ 1.0+1.0j]s	[ 1.-1.j]s[ 1.0-1.0j]s
[ 1.+infj]s[ 1.0+infj]s
[ 1.-infj]s[ 1.0-infj]s
[ 1.+nanj]s[ 1.0+nanj]s	[-1.+0.j]s[-1.0+0.0j]s	[-1.+1.j]s[-1.0+1.0j]s	[-1.-1.j]s[-1.0-1.0j]s
[-1.+infj]s[-1.0+infj]s
[-1.-infj]s[-1.0-infj]s
[-1.+nanj]s[-1.0+nanj]s
[ inf+0.j]s[ inf+0.0j]s
[ inf+1.j]s[ inf+1.0j]s
[ inf-1.j]s[ inf-1.0j]s[ inf+infj]s[ inf-infj]s[ inf+nanj]s
[-inf+0.j]s[-inf+0.0j]s
[-inf+1.j]s[-inf+1.0j]s
[-inf-1.j]s[-inf-1.0j]s[-inf+infj]s[-inf-infj]s[-inf+nanj]s
[ nan+0.j]s[ nan+0.0j]s
[ nan+1.j]s[ nan+1.0j]s
[ nan-1.j]s[ nan-1.0j]s[ nan+infj]s[ nan-infj]s[ nan+nanj](R	RRtcomplext	complex64tcdoubletclongdoubletstrR
tzipR(Rtrvalstrptiptcvalstdtypestctdttactualtwantedtrestval((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyttest_strsT"/;																																			(RRR%(((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyRstTestArray2StringcB`s#eZd�Zd�Zd�ZRS(cC`sKtjd�}ttj|�dk�ttj|dd�dk�dS(sBasic test of array2string.is[0 1 2]tmax_line_widthis[0 1
 2]N(R	tarangeRtarray2string(Rta((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyt
test_basicAscC`s5tjtjd�dd��}t|dk�dS(s0This should only apply to 0-D arrays. See #1218.g�?tstylecS`sdt|�S(NsValue in 0-D array: (R(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyt<lambda>JssValue in 0-D array: 1.5N(R	R)R
R(Rtstylestr((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyttest_style_keywordGscC`s�d�}tjd�}tjddkr:d}d}nd}d}ttj|di|d	6�d
k�ttj|di|d6�d
k�ttj|did�d	6�d
k�ttj|did�d6�|�ttj|did�d6�|�tjd�}ttj|did�d6�dk�ttj|did�d6�dk�tjddg�}ttj|did�d6�dk�dS(s6Test custom format function for each element in array.cS`s:tj|�dkrdStj|�dkr2dSdSdS(Nit.itotO(R	tabs(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyt_format_functionOs
iis
[0x0 0x1 0x2]s
[0o0 0o1 0o2]s[0x0L 0x1L 0x2L]s[0L 01L 02L]t	formattertalls[. o O]tint_kindcS`sd|S(Ns%.4f((R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-bss[0.0000 1.0000 2.0000]cS`s
t|�S(N(thex(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-dstintcS`s
t|�S(N(toct(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-fsg@cS`sd|S(Ns%.2f((R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-jst
float_kinds[0.00 1.00 2.00]cS`sd|S(Ns%.2f((R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-lstfloattabctdefcS`s|dS(Ni((ts((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-pstnumpystrs[abcabc defdef]N(R	R(tsystversion_infoRR)RR
(RR4Rtx_hextx_octR?((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyttest_format_functionMs2		




(RRR+R/RE(((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR&@s		tTestPrintOptionscB`s;eZdZd�Zd�Zd�Zd�Zd�ZRS(s.Test getting and setting global print options.cC`stj�|_dS(N(R	tget_printoptionstoldopts(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pytsetUpwscC`stj|j�dS(N(R	tset_printoptionsRH(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyttearDownzscC`sRtjdddg�}tt|�d�tjdd�tt|�d�dS(Ng�?igރB��?s.array([ 1.5       ,  0.        ,  1.23456789])t	precisionis"array([ 1.5   ,  0.    ,  1.2346])(R	R
RR
RJ(RR((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR+}scC`s@tjd�}tjdid�d6�tt|�d�dS(NiR5cS`st|d�S(Ni(R(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-�sR6sarray([-1, 0, 1])(R	R(RJRR
(RR((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyttest_formatter�scC`s~tjd�}tjdid�d6�tt|�d�tjdidd6�tt|�d�tjdid�d6�tt|�d�tjdidd6�tt|�d�tjdid	�d6�tt|�d�tjdidd
6�tt|�d�tjd�}tjdid�d
6�tt|�d�tjdidd6�tt|�d�dS(NiR5cS`st|d�S(Ni(R(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-�sR6sarray([-1, 0, 1])R9sarray([0, 1, 2])cS`st|d�S(Ni(R(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-�scS`st|d�S(Ni(R(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-�sR7g@cS`st|d�S(Ni(R(R((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyR-�sR<sarray([-1.0, 0.0, 1.0])R;sarray([ 0.,  1.,  2.])(R	R(RJRR
tNone(RR((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyttest_formatter_reset�s$(RRt__doc__RIRKR+RMRO(((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyRFts				cC`scddl}|jddkr(d}nd}tjtd�gdt�}tt|�|�dS(Niisarray(['é'], dtype=object)sarray([u'\xe9'], dtype=object)s�tdtype(RARBR	R
RtobjectRR
(RAtexpectedR((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyttest_unicode_object_array�s	t__main__((t
__future__RRRRAtnumpyR	tnumpy.compatRt
numpy.testingRRRRRRRRR&RFRTR(((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_arrayprint.pyt<module>s"/4+	


Zerion Mini Shell 1.0