ó 2ÄÈ[c@`sûddlmZmZmZddlZddlZddlZddlZddl m Z m Z m Z m Z mZddlZdefd„ƒYZdefd„ƒYZdefd „ƒYZd efd „ƒYZd „Zd efd„ƒYZdS(i(tdivisiontabsolute_importtprint_functionN(tassert_t assert_equalt assert_raisest assert_warnst HAS_REFCOUNTt TestArrayReprcB`seeZd„Zd„Zejjddƒd„ƒZd„Zd„Z d„Z d„Z d „Z RS( cC`s2tjtjtjgƒ}tt|ƒdƒdS(Nsarray([nan, inf])(tnptarraytnantinfRtrepr(tselftx((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyt test_nan_infscC`s¿dtjfd„ƒY}tjddgƒj|ƒ}tt|ƒdƒtjddgddggƒj|ƒ}tt|ƒdƒtjd d dgƒj|ƒ}tt|ƒd ƒdS(NtsubcB`seZRS((t__name__t __module__(((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyRsiis sub([1, 2])iissub([[1, 2], [3, 4]])tdtypetasrstallt formatter((tshapeR4R t array2string(Rtfmt((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyt__str__ns (RRR$R4R;((R+(s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyR+ds is[zero one two many many]iR/((((R RRR R(R'tarangeR(RRtytdc((R+Rs?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_0d_object_subclass<s0       cC`s§tjdƒ}||dscC`sCtjdddƒ}tt|ƒdƒtt|dƒdƒdS(NiRsƒdS(ANgO¯”eˆã?g/Ý$í?gsh‘í|?Ý?goÅ1·?gù1æ®%ä×?gß¿yqâ«}?gðHPüâ?gçû©ñÒMî?gª‚QI€Î?gΈÒÞà Û?Rgàò:@2®Ò?gõ×åù‘4à?gjI¥œd;Ò?gB¬´«ƒËÛ?g«èwæqç?gÆÆxÝ $Ö?g𠮶?g°ÌÃ;Ù?ii gð?yð?g6–sÓ­ùñ?y6–sÓ­ùñ?RÍis1e{}g®Gáz®(@gY@gñrø¥%4xYt floatmodetuniquesarray([0.6104 , 0.922 , 0.457 , 0.0906 , 0.3733 , 0.007244, 0.5933 , 0.947 , 0.2383 , 0.4226 ], dtype=float16)s½array([0.2918820979355541 , 0.5064172631089138 , 0.2848750619642916 , 0.4342965294660567 , 0.7326538397312751 , 0.3459503329096204 , 0.0862072768214508 , 0.39112753029631175])s4array([0. , 0.1, 0.2, 0.3, 0.4, 0.5], dtype=float16)säarray([1.e+00, 1.e+01, 1.e+02, 1.e+03, 1.e+04, 1.e+05, 1.e+06, 1.e+07, 1.e+08, 1.e+09, 1.e+10, 1.e+11, 1.e+12, 1.e+13, 1.e+14, 1.e+15, 1.e+16, 1.e+17, 1.e+18, 1.e+19, 1.e+20, 1.e+21, 1.e+22, 1.e+23, 1.e+24])s+array([1.234e+001, 1.000e+002, 1.000e+123])s;array([1. +1.j , 1.123456789+1.123456789j])RuRºisnarray([0.2918821 , 0.50641726, 0.28487506, 0.43429653, 0.73265384, 0.34595033, 0.08620728, 0.39112753])is/array([1.e+00, 1.e+05, 1.e+10, 1.e+15, 1.e+20])s7array([1. +1.j , 1.12345679+1.12345679j])tfixedismarray([0.6104, 0.9219, 0.4570, 0.0906, 0.3733, 0.0072, 0.5933, 0.9468, 0.2383, 0.4226], dtype=float16)sGarray([0.2919, 0.5064, 0.2849, 0.4343, 0.7327, 0.3460, 0.0862, 0.3911])sFarray([0.0000, 0.1000, 0.2000, 0.3000, 0.3999, 0.5000], dtype=float16)sCarray([1.0000e+00, 1.0000e+05, 1.0000e+10, 1.0000e+15, 1.0000e+20])s.array([1.2340e+001, 1.0000e+002, 1.0000e+123])isarray([0.0000, 0.0000, 0.0000])s'array([1.0000+1.0000j, 1.1235+1.1235j])searray([0.00000000, 0.09997559, 0.19995117, 0.30004883, 0.39990234, 0.50000000], dtype=float16)t maxprec_equalsarray([0.610352, 0.921875, 0.457031, 0.090576, 0.373291, 0.007244, 0.593262, 0.946777, 0.238281, 0.422607], dtype=float16)snarray([0.29188210, 0.50641726, 0.28487506, 0.43429653, 0.73265384, 0.34595033, 0.08620728, 0.39112753])s4array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5], dtype=float16)s7array([1.00000000+1.00000000j, 1.12345679+1.12345679j])yð?ð?y6–sÓ­ùñ?6–sÓ­ùñ?( R R tfloat16R‰R<trangetformatRŠRR R‹(RRR=RÈR[tiRÉtwp((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_floatmodeIs~   :                  cC`s¬tjddƒtttjdƒƒdƒtttjtdtjƒƒƒdƒtjdtƒtttjdƒƒdƒtttjtdtjƒƒƒdƒdS( NRds1.13g|Ó­ùñ?s 1.12345678912is (1+nan*j)s1.1234567891234568s(1+nanj)( R RŠRR(R‰t complex128RQR R|(R((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_legacy_mode_scalars¤s(cC`s\tjddƒtttjdƒƒdƒtjdtƒtttjdƒƒdƒdS(NRds1.13i's$[ 0 1 2 ..., 9997 9998 9999]s#[ 0 1 2 ... 9997 9998 9999](R RŠRR(R<R|(R((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_legacy_stray_comma°scC`såtjddƒtttjddddƒƒdƒtttjddddƒƒtjd ƒƒtjd d kr|d nd }tttj d d|ƒƒdj |ƒƒtttj dd|ƒƒtjdj |ƒƒƒdS(Nt linewidthiKi g4@Rtf4sHarray([10., 11., 12., 13., 14., 15., 16., 17., 18., 19.], dtype=float32)g7@su array([10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22.], dtype=float32)iis array([2, 2, 2, 2, 2, 2, 2, 2])(R RRŠRR RŽRR|(RR((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_linewidth_reprÆs,       cC`swtjdddƒ}tjddƒtt|ƒtjdƒƒtjddddƒtt|ƒtjdƒƒdS( NiRèiRäsK [2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2]Rds1.13s> [2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2](R RRŠRR(RŽR(RR((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_linewidth_strës   cC`sÁtjddddƒtjdƒjd ƒ}tt|ƒtjdƒƒtjd ƒ}tt|ƒtjdƒƒtjdd ƒtt|ƒtjd ƒƒtt|ƒtjd ƒƒdS(NRšiR›iisÚ array([[[ 0, ..., 2], ..., [ 6, ..., 8]], ..., [[18, ..., 20], ..., [24, ..., 26]]])sÄ array([[[[0.]], ..., [[0.]]], ..., [[[0.]], ..., [[0.]]]])Rds1.13sÜ array([[[ 0, ..., 2], ..., [ 6, ..., 8]], ..., [[18, ..., 20], ..., [24, ..., 26]]])sÇ array([[[[ 0.]], ..., [[ 0.]]], ..., [[[ 0.]], ..., [[ 0.]]]])(iii(iiii( R RŠR<R¡RR RŽRR‹(RRR¨((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_edgeitemsýs(        (RRt__doc__R¸R¹ReR¾R¿RÀRÇRÊRÌRÓRÕRÖRàRâRãRçRéRêRë(((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyRµ—s(      %  )   [   % cC`s]ddl}|jddkr(d}nd}tjdgdtƒ}tt|ƒ|ƒdS(Niisarray(['é'], dtype=object)sarray([u'\xe9'], dtype=object)uéR(RvRwR R tobjectRR (RvtexpectedR((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_unicode_object_arrayDs   tTestContextManagercB`s,eZd„Zd„Zd„Zd„ZRS(cC`sFtjddƒ!ttjdgƒdƒ}WdQXt|dƒdS(NRºig@is[0.67](R t printoptionsR(R R(RRs((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyt test_ctx_mgrOs"cC`sRtjƒ}tjd|ddd|ddƒWdQXttjƒ|ƒdS(NRºiRäi(R R¶RñR(Rtopts((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_ctx_mgr_restoresUs  cC`s`tjƒ}y)tjddddƒ t‚WdQXWntk rHnXttjƒ|ƒdS(NRºiRäi (R R¶Rñt ValueErrorR(RRó((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_ctx_mgr_exceptions]s  c`sRidd6}tj|}|jƒ‰WdQXt‡fd†|Dƒ|ƒdS(NiRºc`si|]}ˆ||“qS(((t.0tk(t saved_opts(s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pys ks (R RñtcopyR(RRótctx((Rùs?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyttest_ctx_mgr_as_smthgs (RRRòRôRöRü(((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyRðNs   (t __future__RRRRvR¬RMtnumpyR t numpy.testingRRRRRRŽRíRRPRbRµRïRð(((s?/tmp/pip-build-fiC0ax/numpy/numpy/core/tests/test_arrayprint.pyts    ( /Êÿ®