ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ]c#@`sdZddlmZmZmZddlZddlZddlZddlZddl Z ddl m Z m Z ddl Z ddlZddlmZmZddlmZddlmZmZmZmZmZmZmZddlmZejdd krdd lm Z ndd l m Z d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-g#Z!d(e"fd.YZ#e#Z$dZ%d/ej&kZ'e(ed0ddk Z*d1Z+d2d3Z,d4Z-d5Z.d6Z/ed7d8d9Z0ej1d:krbdd;ddd<Z2d=dd>Z3n5ej4d? d@krdAej5dBZ3n dCZ3ej4d? d@krdAej5gdDZ6n gdEZ6dFe7dvdIdJZ8d2e7dKZ9dLZ:dMd2e7dNZ;dMd2e7dOZ<d2e7d2dPe7e7dQZ=d2e7dRZ>dPd2e7dSZ?d2e7dTZ@dUZAdVZBde7dWZCdXZDdYZEdZZFdd[ZGd\dd]ZHd^ZId_de7d2e7d`ZJd\daZKd\ddbZLddcZMddZNdeZOdfePfdgYZQdhePfdiYZRejSddjZTdkZUejSddlZVdmZWedndodpZXd%e"fdqYZYejSdrZZejSdsZ[d&e j\fdtYZ]d-ePfduYZ^dS(ws* Utility function to facilitate testing. i(tdivisiontabsolute_importtprint_functionN(tpartialtwraps(tmkdtemptmkstemp(tSkipTest(tfloat32temptytaranget array_reprtndarraytisnattarray(t deprecatei(tStringIOt assert_equaltassert_almost_equaltassert_approx_equaltassert_array_equaltassert_array_lesstassert_string_equaltassert_array_almost_equalt assert_raisest build_err_msgtdecorate_methodstjiffiestmemusagetprint_assert_equaltraisestrandtrundocst runstringtverbosetmeasuretassert_tassert_array_almost_equal_nulptassert_raises_regextassert_array_max_ulpt assert_warnstassert_no_warningstassert_allclosetIgnoreExceptiontclear_and_catch_warningsRtKnownFailureExceptionttemppathttempdirtIS_PYPYt HAS_REFCOUNTtsuppress_warningscB`seZdZRS(s<Raise this exception to mark a test as a known failing test.(t__name__t __module__t__doc__(((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR-)st__pypy__t getrefcountcC`sqt}d}yddl}Wntk r5t}nX|j|krNt}n|smd|}t|n|S(s# Import nose only when needed. iiNs@Need nose >= %d.%d.%d for tests - see http://nose.readthedocs.io(iii(tTruetnoset ImportErrortFalset__versioninfo__(t nose_is_goodtminimum_nose_versionR9tmsg((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt import_nose5s   tcC`sFt}|sBy |}Wntk r2|}nXt|ndS(sI Assert that works in release mode. Accepts callable msg to allow deferring evaluation until failure. The Python built-in ``assert`` does not work when executing code in optimized mode (the ``-O`` flag) - no byte-code is generated for it. For documentation on usage, refer to the Python documentation. N(R8t TypeErrortAssertionError(tvalR?t__tracebackhide__tsmsg((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR$Ks    cC`sDddlm}||}t|ttr@tdn|S(slike isnan, but always raise an error if type not supported instead of returning a TypeError object. Notes ----- isnan and other ufunc sometimes return a NotImplementedType object instead of raising any exception. This function is a wrapper to make sure an exception is always raised. This should be removed once this problem is solved at the Ufunc level.i(tisnans!isnan not supported for this type(t numpy.coreRGt isinstancettypetNotImplementedRB(txRGtst((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pytgisnan_s  cC`s`ddlm}m}|dd5||}t|ttrVtdnWdQX|S(slike isfinite, but always raise an error if type not supported instead of returning a TypeError object. Notes ----- isfinite and other ufunc sometimes return a NotImplementedType object instead of raising any exception. This function is a wrapper to make sure an exception is always raised. This should be removed once this problem is solved at the Ufunc level.i(tisfiniteterrstatetinvalidtignores$isfinite not supported for this typeN(RHRORPRIRJRKRB(RLRORPRM((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt gisfiniteqs  cC`s`ddlm}m}|dd5||}t|ttrVtdnWdQX|S(slike isinf, but always raise an error if type not supported instead of returning a TypeError object. Notes ----- isinf and other ufunc sometimes return a NotImplementedType object instead of raising any exception. This function is a wrapper to make sure an exception is always raised. This should be removed once this problem is solved at the Ufunc level.i(tisinfRPRQRRs!isinf not supported for this typeN(RHRTRPRIRJRKRB(RLRTRPRM((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pytgisinfs  tmessagesNnumpy.testing.rand is deprecated in numpy 1.11. Use numpy.random.rand instead.cG`skddl}ddlm}m}|||}|j}x*tt|D]}|j||: {}]is...s %s: %s(tfindR\Rt enumerateRIR RR treprt ExceptionRpRJR3tcounttjoint splitlines( tarraysterr_msgtheaderR"tnamesRR?R`tatr_funcRztexc((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRs& 1 "cC`sJt}t|trt|ts?ttt|ntt|t|||x`|jD]R\}}||krtt|nt||||d||f|qkWdSt|t t frTt|t t frTtt|t|||x?t t|D]+}t||||d||f|q!WdSddl m }m}m} ddlm} m} m} t||st||rt||||St||g|d|} y| |p| |}Wntk r t}nX|r| |r;| |}| |}n |}d}| |rn| |}| |}n |}d}yt||t||Wqtk rt| qXn||||krt| nyt|ot|s^t|}t|}|s!|r?|o*|sZt| qZn||ksZt| ndS|dkr|dkr| || |kst| qnWntttfk rnXyPt|t|krt|jjt|jjkrdSt| Wntttfk r*nX||ksFt| ndS(sa Raises an AssertionError if two objects are not equal. Given two objects (scalars, lists, tuples, dictionaries or numpy arrays), check that all elements of these objects are equal. An exception is raised at the first conflicting values. Parameters ---------- actual : array_like The object to check. desired : array_like The expected object. err_msg : str, optional The error message to be printed in case of failure. verbose : bool, optional If True, the conflicting values are appended to the error message. Raises ------ AssertionError If actual and desired are not equal. Examples -------- >>> np.testing.assert_equal([4,5], [4,6]) ... : Items are not equal: item=1 ACTUAL: 5 DESIRED: 6 s key=%r %sNs item=%r %si(R tisscalartsignbit(t iscomplexobjtrealtimagR"(R8RItdictRCRRJRR\titemstlistttupleR[RHR RRt numpy.libRRRRRt ValueErrorR;RSRNRBRR Rtdtype(tactualtdesiredRR"REtkR`R RRRRRR?t usecomplextactualrtactualitdesiredrtdesireditisdesnantisactnan((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR"s# )*)             $ cC`st}ddl}||kst}|j||jd|j|||jd|j||t|jndS(s Test if two objects are equal, and print an error message if test fails. The test is performed with ``actual == desired``. Parameters ---------- test_string : str The message supplied to AssertionError. actual : object The object to test for equality against `desired`. desired : object The expected result. Examples -------- >>> np.testing.print_assert_equal('Test XYZ of func xyz', [0, 1], [0, 1]) >>> np.testing.print_assert_equal('Test XYZ of func xyz', [0, 1], [0, 2]) Traceback (most recent call last): ... AssertionError: Test XYZ of func xyz failed ACTUAL: [0, 1] DESIRED: [0, 2] iNs failed ACTUAL: s DESIRED: (R8tpprintRtwriteRCtgetvalue(t test_stringRRRERR?((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRs      ic`sTt}ddlm}ddlm}m}m} y|pJ|} Wntk rgt} nXfd} | r?|r|} | } n } d} |r|}| }n }d}y*t | |dt | |dWq?t k r;t | q?Xnt |t t fsot |t t frtSytotststrtotst | qnkst | ndSWnttfk rnXtdd krPt | ndS( sp Raises an AssertionError if two items are not equal up to desired precision. .. note:: It is recommended to use one of `assert_allclose`, `assert_array_almost_equal_nulp` or `assert_array_max_ulp` instead of this function for more consistent floating point comparisons. The test verifies that the elements of ``actual`` and ``desired`` satisfy. ``abs(desired-actual) < 1.5 * 10**(-decimal)`` That is a looser test than originally documented, but agrees with what the actual implementation in `assert_array_almost_equal` did up to rounding vagaries. An exception is raised at conflicting values. For ndarrays this delegates to assert_array_almost_equal Parameters ---------- actual : array_like The object to check. desired : array_like The expected object. decimal : int, optional Desired precision, default is 7. err_msg : str, optional The error message to be printed in case of failure. verbose : bool, optional If True, the conflicting values are appended to the error message. Raises ------ AssertionError If actual and desired are not equal up to specified precision. See Also -------- assert_allclose: Compare two array_like objects for equality with desired relative and/or absolute precision. assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal Examples -------- >>> import numpy.testing as npt >>> npt.assert_almost_equal(2.3333333333333, 2.33333334) >>> npt.assert_almost_equal(2.3333333333333, 2.33333334, decimal=10) ... : Items are not equal: ACTUAL: 2.3333333333333002 DESIRED: 2.3333333399999998 >>> npt.assert_almost_equal(np.array([1.0,2.3333333333333]), ... np.array([1.0,2.33333334]), decimal=9) ... : Arrays are not almost equal (mismatch 50.0%) x: array([ 1. , 2.33333333]) y: array([ 1. , 2.33333334]) i(R (RRRc`s)d}tgdd|S(Ns*Arrays are not almost equal to %d decimalsR"R(R(R(RtdecimalRRR"(sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt_build_err_msgs RNg?g$@(R8RHR RRRRRR;RRCRIRRRRSRNRRBtabs(RRRRR"RER RRRRRRRRR((RRRRR"sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRsNA        c C`st}ddl}tt||f\}}||kr=dS|jddId|j||j|}|jd|j|j|}WdQXy||}Wnt k rd}nXy||} Wnt k rd} nXt ||g|dd |d |} y}t |o't |st |sBt |rlt |oWt |st | qn||kst | ndSWnttfk rnX|j|| |jd |d  krt | ndS( sU Raises an AssertionError if two items are not equal up to significant digits. .. note:: It is recommended to use one of `assert_allclose`, `assert_array_almost_equal_nulp` or `assert_array_max_ulp` instead of this function for more consistent floating point comparisons. Given two numbers, check that they are approximately equal. Approximately equal is defined as the number of significant digits that agree. Parameters ---------- actual : scalar The object to check. desired : scalar The expected object. significant : int, optional Desired precision, default is 7. err_msg : str, optional The error message to be printed in case of failure. verbose : bool, optional If True, the conflicting values are appended to the error message. Raises ------ AssertionError If actual and desired are not equal up to specified precision. See Also -------- assert_allclose: Compare two array_like objects for equality with desired relative and/or absolute precision. assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal Examples -------- >>> np.testing.assert_approx_equal(0.12345677777777e-20, 0.1234567e-20) >>> np.testing.assert_approx_equal(0.12345670e-20, 0.12345671e-20, significant=8) >>> np.testing.assert_approx_equal(0.12345670e-20, 0.12345672e-20, significant=8) ... : Items are not equal to 8 significant digits: ACTUAL: 1.234567e-021 DESIRED: 1.2345672000000001e-021 the evaluated condition that raises the exception is >>> abs(0.12345670e-20/1e-21 - 0.12345672e-20/1e-21) >= 10**-(8-1) True iNRQRRg?i gRs-Items are not equal to %d significant digits:R"g$@i(R8tnumpytmaptfloatRPRtpowertfloortlog10tZeroDivisionErrorRRSRNRCRBR( RRt significantRR"REtnptscalet sc_desiredt sc_actualR?((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRFs@9   *      *ic ! `st} ddlm} m} m} m} m}| dtdt| dtdtd}d}dfd}yjdkpjdkpjjk}|st gd jjfd d d dd}t |n|r|rt}}|r| | }}| |pp| |}|r|||ddqn|r| | }}| |p| |}|r|| k| kdd|| k| kddqn|rD|rD||B||Bn>|rc||n|r||nj dkrLdSn|rL|rL|rLj j j j krLtt}}| |s| |r|||ddn| |s-| |rI||qIqLn|}t|tr||}dg}n$|j}|j}|j}|sdd|jdt|}t gd|fd d d dd}|st |qnWnrtk rddl}|j} d| ft gd d d dd}t|nXdS(Ni(RRGRTtanytinftcopytsubokcS`s|jjdkS(Ns?bhilqpBHILQPefdgFDG(Rtchar(RL((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pytisnumberscS`s|jjdkS(NtMm(RR(RL((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pytistimestnanc `sjyt||WnRtk retgd|dddd d}t|nXdS( sTHandling nan/inf: check that x and y have the nan/inf at the same locations.s x and y %s location mismatch:R"RRRLtyRN(RLR(RRCR(tx_idty_idthasvalR?(RRRR"RLR(sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pytchk_same_positions  s (shapes %s, %s mismatch)R"RRRLRRRs+infs-inftNaTidgY@is (mismatch %s%%)serror during assertion: %s %s(((RLR(RLR(RLR(R8RHRRGRTRRR;tshapeRRCtsizeRRJR RItbooltraveltallttolistRR\Rt tracebackt format_exc(!t comparisonRLRRR"RRt equal_nant equal_infRERRGRTRRRRRtcondR?thas_nanthas_inftx_isnanty_isnantx_isinfty_isinftx_isnatty_isnatRDtreducedtmatchRtefmt((RRRR"RLRsF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pytassert_array_compares(  ! 0    !'        !     c C`s/t}ttj||d|d|dddS(s, Raises an AssertionError if two array_like objects are not equal. Given two array_like objects, check that the shape is equal and all elements of these objects are equal. An exception is raised at shape mismatch or conflicting values. In contrast to the standard usage in numpy, NaNs are compared like numbers, no assertion is raised if both objects have NaNs in the same positions. The usual caution for verifying equality with floating point numbers is advised. Parameters ---------- x : array_like The actual object to check. y : array_like The desired, expected object. err_msg : str, optional The error message to be printed in case of failure. verbose : bool, optional If True, the conflicting values are appended to the error message. Raises ------ AssertionError If actual and desired objects are not equal. See Also -------- assert_allclose: Compare two array_like objects for equality with desired relative and/or absolute precision. assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal Examples -------- The first assert does not raise an exception: >>> np.testing.assert_array_equal([1.0,2.33333,np.nan], ... [np.exp(0),2.33333, np.nan]) Assert fails with numerical inprecision with floats: >>> np.testing.assert_array_equal([1.0,np.pi,np.nan], ... [1, np.sqrt(np.pi)**2, np.nan]) ... : AssertionError: Arrays are not equal (mismatch 50.0%) x: array([ 1. , 3.14159265, NaN]) y: array([ 1. , 3.14159265, NaN]) Use `assert_allclose` or one of the nulp (number of floating point values) functions for these cases instead: >>> np.testing.assert_allclose([1.0,np.pi,np.nan], ... [1, np.sqrt(np.pi)**2, np.nan], ... rtol=1e-10, atol=0) RR"RsArrays are not equalN(R8Rtoperatort__eq__(RLRRR"RE((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRs?c `st}ddlm}mmmmddlmddl m fd}t |||d|d|dd d d S( s Raises an AssertionError if two objects are not equal up to desired precision. .. note:: It is recommended to use one of `assert_allclose`, `assert_array_almost_equal_nulp` or `assert_array_max_ulp` instead of this function for more consistent floating point comparisons. The test verifies identical shapes and that the elements of ``actual`` and ``desired`` satisfy. ``abs(desired-actual) < 1.5 * 10**(-decimal)`` That is a looser test than originally documented, but agrees with what the actual implementation did up to rounding vagaries. An exception is raised at shape mismatch or conflicting values. In contrast to the standard usage in numpy, NaNs are compared like numbers, no assertion is raised if both objects have NaNs in the same positions. Parameters ---------- x : array_like The actual object to check. y : array_like The desired, expected object. decimal : int, optional Desired precision, default is 6. err_msg : str, optional The error message to be printed in case of failure. verbose : bool, optional If True, the conflicting values are appended to the error message. Raises ------ AssertionError If actual and desired are not equal up to specified precision. See Also -------- assert_allclose: Compare two array_like objects for equality with desired relative and/or absolute precision. assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal Examples -------- the first assert does not raise an exception >>> np.testing.assert_array_almost_equal([1.0,2.333,np.nan], [1.0,2.333,np.nan]) >>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan], ... [1.0,2.33339,np.nan], decimal=5) ... : AssertionError: Arrays are not almost equal (mismatch 50.0%) x: array([ 1. , 2.33333, NaN]) y: array([ 1. , 2.33339, NaN]) >>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan], ... [1.0,2.33333, 5], decimal=5) : ValueError: Arrays are not almost equal x: array([ 1. , 2.33333, NaN]) y: array([ 1. , 2.33333, 5. ]) i(taroundtnumbertfloat_t result_typeR(t issubdtype(Rc`s)yt|s't|rt|}t|}||kjsUtS|j|jkordknr||kS||}||}nWnttfk rnX|d}|d|dtdt}t||}|js|j }n|dd kS(Nig?RRRg?g$@( RURR;RRBRR8RRtastype(RLRtxinfidtyinfidRtz(RRRRtnpanyRR(sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pytcompares$$  "  RR"Rs*Arrays are not almost equal to %d decimalsRN( R8RHRRRRRtnumpy.core.numerictypesRtnumpy.core.fromnumericRR(RLRRRR"RERR((RRRRRRRsF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRYsH(! c C`s5t}ttj||d|d|dddtdS(sF Raises an AssertionError if two array_like objects are not ordered by less than. Given two array_like objects, check that the shape is equal and all elements of the first object are strictly smaller than those of the second object. An exception is raised at shape mismatch or incorrectly ordered values. Shape mismatch does not raise if an object has zero dimension. In contrast to the standard usage in numpy, NaNs are compared, no assertion is raised if both objects have NaNs in the same positions. Parameters ---------- x : array_like The smaller object to check. y : array_like The larger object to compare. err_msg : string The error message to be printed in case of failure. verbose : bool If True, the conflicting values are appended to the error message. Raises ------ AssertionError If actual and desired objects are not equal. See Also -------- assert_array_equal: tests objects for equality assert_array_almost_equal: test objects for equality up to precision Examples -------- >>> np.testing.assert_array_less([1.0, 1.0, np.nan], [1.1, 2.0, np.nan]) >>> np.testing.assert_array_less([1.0, 1.0, np.nan], [1, 2.0, np.nan]) ... : Arrays are not less-ordered (mismatch 50.0%) x: array([ 1., 1., NaN]) y: array([ 1., 2., NaN]) >>> np.testing.assert_array_less([1.0, 4.0], 3) ... : Arrays are not less-ordered (mismatch 50.0%) x: array([ 1., 4.]) y: array(3) >>> np.testing.assert_array_less([1.0, 2.0, 3.0], [4]) ... : Arrays are not less-ordered (shapes (3,), (1,) mismatch) x: array([ 1., 2., 3.]) y: array([4]) RR"RsArrays are not less-orderedRN(R8RRt__lt__R;(RLRRR"RE((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRs BcB`s ||UdS(N((tastrR((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR!sc C`sMt}ddl}t|ts<ttt|nt|tsfttt|ntjd|d|tj rdSt |j j |j d|j d}g}xH|r |jd}|jdrqn|jdr|g}|jd}|jdrB|j||jd}n|jd sftt|n|j||r|jd} | jdr|j| q|jd| ntjd|d d|d rqn|j|qntt|qW|sdSd d j|j} ||krIt| ndS( s Test if two strings are equal. If the given strings are equal, `assert_string_equal` does nothing. If they are not equal, an AssertionError is raised, and the diff between the strings is shown. Parameters ---------- actual : str The string to test for equality against the expected string. desired : str The expected string. Examples -------- >>> np.testing.assert_string_equal('abc', 'abc') >>> np.testing.assert_string_equal('abc', 'abcd') Traceback (most recent call last): File "", line 1, in ... AssertionError: Differences in strings: - abc+ abcd? + iNs\As\Zis s- s? s+ isDifferences in strings: %sRA(R8tdifflibRItstrRCRRJtreRtMRtDifferRRtpopt startswithRtinserttextendRtrstrip( RRRERtdifft diff_listtd1Rtd2td3R?((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRsL  0    "  c `sddlm}ddl}|dkrGtjd}|jd}ntjj tjj |d}|||}|j j |}|j dt}g|rfd} nd} x!|D]} |j| d| qW|jdkr|rtd d jndS( sT Run doctests found in the given file. By default `rundocs` raises an AssertionError on failure. Parameters ---------- filename : str The path to the file for which the doctests are run. raise_on_error : bool Whether to raise an AssertionError when a doctest fails. Default is True. Notes ----- The doctests can be run by the user/developer by adding the ``doctests`` argument to the ``test()`` call. For example, to run all tests (including doctests) for `numpy.lib`: >>> np.lib.test(doctests=True) #doctest: +SKIP i(tnpy_load_moduleNit__file__R"c`s j|S(N(R(ts(R?(sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt{RAtoutsSome doctests failed: %ss (t numpy.compatRtdoctestRctsyst _getframet f_globalstosRrtsplitexttbasenamet DocTestFinderRt DocTestRunnerR;truntfailuresRCR( tfilenametraise_on_errorRRR_tnametmtteststrunnerR ttest((R?sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR Xs"  " cO`st}|jj||S(N(R@ttoolsR(R]tkwargsR9((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRs cO`s"t}t}|jj||S(s assert_raises(exception_class, callable, *args, **kwargs) assert_raises(exception_class) Fail unless an exception of class exception_class is thrown by callable when invoked with arguments args and keyword arguments kwargs. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. Alternatively, `assert_raises` can be used as a context manager: >>> from numpy.testing import assert_raises >>> with assert_raises(ZeroDivisionError): ... 1 / 0 is equivalent to >>> def div(x, y): ... return x / y >>> assert_raises(ZeroDivisionError, div, 1, 0) (R8R@R R(R]R!RER9((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRs cO`sOt}t}tjjdkr0|jj}n |jj}|||||S(sY assert_raises_regex(exception_class, expected_regexp, callable, *args, **kwargs) assert_raises_regex(exception_class, expected_regexp) Fail unless an exception of class exception_class and with message that matches expected_regexp is thrown by callable when invoked with arguments args and keyword arguments kwargs. Alternatively, can be used as a context manager like `assert_raises`. Name of this function adheres to Python 3.2+ reference, but should work in all versions down to 2.6. Notes ----- .. versionadded:: 1.9.0 i(R8R@Rt version_infotmajorR R&tassert_raises_regexp(texception_classtexpected_regexpR]R!RER9tfuncname((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR&s   c C`s|dkr%tjdtj}ntj|}|j}ddlm}g|jD]}||rZ|^qZ}x|D]}}y(t |dr|j }n |j }Wnt k rqnX|j |r|jd rt||||qqWdS(s  Apply a decorator to all methods in a class matching a regular expression. The given decorator is applied to all public methods of `cls` that are matched by the regular expression `testmatch` (``testmatch.search(methodname)``). Methods that are private, i.e. start with an underscore, are ignored. Parameters ---------- cls : class Class whose methods to decorate. decorator : function Decorator to apply to methods testmatch : compiled regexp or str, optional The regular expression. Default value is None, in which case the nose default (``re.compile(r'(?:^|[\b_\.%s-])[Tt]est' % os.sep)``) is used. If `testmatch` is a string, it is compiled to a regular expression first. s(?:^|[\\b_\\.%s-])[Tt]esti(t isfunctiontcompat_func_namet_N(RcRtcompileRtsept__dict__tinspectR(tvaluesthasattrR)R3tAttributeErrortsearchRtsetattr( tclst decoratort testmatchtcls_attrR(t_mtmethodstfunctionR'((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRs   +    ic B`sejd}|j|j}}e|d|d}d}e}x$||krm|d7}|||UqJWe|}d|S(sE Return elapsed time for executing code in the namespace of the caller. The supplied code string is compiled with the Python builtin ``compile``. The precision of the timing is 10 milli-seconds. If the code will execute fast on this timescale, it can be executed many times to get reasonable timing accuracy. Parameters ---------- code_str : str The code to be timed. times : int, optional The number of times the code is executed. Default is 1. The code is only compiled once. label : str, optional A label to identify `code_str` with. This is passed into ``compile`` as the second argument (for run-time error messages). Returns ------- elapsed : float Total elapsed time in seconds for executing `code_str` `times` times. Examples -------- >>> etime = np.testing.measure('for i in range(1000): np.sqrt(i**2)', ... times=times) >>> print("Time for a single execution : ", etime / times, "s") Time for a single execution : 0.005 s isTest name: %s texecig{Gz?(RRtf_localsRR+R( tcode_strttimestlabeltframetlocstglobstcodeR`telapsed((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR#s!    cC`sts tSddl}|jdjdd}|}d}tj|}x#tdD]}|||}qYWttj||k~dS(sg Check that ufuncs don't mishandle refcount of object `1`. Used in a few regression tests. iNidiii'( R1R8RR treshapeRR7R[R$(topRtbtcR`trctjtd((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt_assert_valid_refcount(s gHz>c `st}ddlfd}j|j|}}df} t|||dt|d|d| ddS( sq Raises an AssertionError if two objects are not equal up to desired tolerance. The test is equivalent to ``allclose(actual, desired, rtol, atol)``. It compares the difference between `actual` and `desired` to ``atol + rtol * abs(desired)``. .. versionadded:: 1.5.0 Parameters ---------- actual : array_like Array obtained. desired : array_like Array desired. rtol : float, optional Relative tolerance. atol : float, optional Absolute tolerance. equal_nan : bool, optional. If True, NaNs will compare equal. err_msg : str, optional The error message to be printed in case of failure. verbose : bool, optional If True, the conflicting values are appended to the error message. Raises ------ AssertionError If actual and desired are not equal up to specified precision. See Also -------- assert_array_almost_equal_nulp, assert_array_max_ulp Examples -------- >>> x = [1e-5, 1e-3, 1e-1] >>> y = np.arccos(np.cos(x)) >>> assert_allclose(x, y, rtol=1e-5, atol=0) iNc `s(jjj||dddS(NtrtoltatolR(tcoretnumerictisclose(RLR(RNRRRM(sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRls!s'Not equal to tolerance rtol=%g, atol=%gRR"RR(R8Rt asanyarrayRR( RRRMRNRRR"RERR((RNRRRMsF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR*<s- c C`st}ddl}|j|}|j|}||j|j||k||}|j|j|||ks|j|s|j|rd|}n(|jt||} d|| f}t |ndS(s Compare two arrays relatively to their spacing. This is a relatively robust method to compare two arrays whose amplitude is variable. Parameters ---------- x, y : array_like Input arrays. nulp : int, optional The maximum number of unit in the last place for tolerance (see Notes). Default is 1. Returns ------- None Raises ------ AssertionError If the spacing between `x` and `y` for one or more elements is larger than `nulp`. See Also -------- assert_array_max_ulp : Check that all items of arrays differ in at most N Units in the Last Place. spacing : Return the distance between x and the nearest adjacent number. Notes ----- An assertion is raised if the following condition is not met:: abs(x - y) <= nulps * spacing(maximum(abs(x), abs(y))) Examples -------- >>> x = np.array([1., 1e-10, 1e-20]) >>> eps = np.finfo(x.dtype).eps >>> np.testing.assert_array_almost_equal_nulp(x, x*eps/2 + x) >>> np.testing.assert_array_almost_equal_nulp(x, x*eps + x) Traceback (most recent call last): ... AssertionError: X and Y are not equal to 1 ULP (max is 2) iNsX and Y are not equal to %d ULPs+X and Y are not equal to %d ULP (max is %g)( R8RRtspacingtwhereRRtmaxt nulp_diffRC( RLRtnulpRERtaxtaytrefR?tmax_nulp((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR%vs1 (" cC`sPt}ddl}t|||}|j||ksLtd|n|S(s Check that all items of arrays differ in at most N Units in the Last Place. Parameters ---------- a, b : array_like Input arrays to be compared. maxulp : int, optional The maximum number of units in the last place that elements of `a` and `b` can differ. Default is 1. dtype : dtype, optional Data-type to convert `a` and `b` to if given. Default is None. Returns ------- ret : ndarray Array containing number of representable floating point numbers between items in `a` and `b`. Raises ------ AssertionError If one or more elements differ by more than `maxulp`. See Also -------- assert_array_almost_equal_nulp : Compare two arrays relatively to their spacing. Examples -------- >>> a = np.linspace(0., 1., 100) >>> res = np.testing.assert_array_max_ulp(a, np.arcsin(np.sin(a))) iNs(Arrays are not almost equal up to %g ULP(R8RRVRRC(RRGtmaxulpRRERtret((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR's$  c`s.ddl|r?j|d|}j|d|}nj|}j|}j||}j|sj|rtdnj|d|}j|d|}|j|jkstd|j|jfnfd}t|}t|}||||S(sFor each item in x and y, return the number of representable floating points between them. Parameters ---------- x : array_like first input array y : array_like second input array dtype : dtype, optional Data-type to convert `x` and `y` to if given. Default is None. Returns ------- nulp : array_like number of representable floating point numbers between each item in x and y. Examples -------- # By definition, epsilon is the smallest number such as 1 + eps != 1, so # there should be exactly one ULP between 1 and 1 + eps >>> nulp_diff(1, 1 + np.finfo(x.dtype).eps) 1.0 iNRs'_nulp not implemented for complex arrays+x and y do not have the same shape: %s - %sc`s&j||d|}j|S(NR(RR(trxtrytvdtR(R(sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt_diffs(RRt common_typeRRRRt integer_repr(RLRRttRaR^R_((RsF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRVs$   cC`s\|j|}|jdks?|||dk||dk||_|dkr(tjd|_n ||_t|_dS(Ntwarnings(t_recordRcRtmodulest_moduleR;t_entered(Rrtrecordtmodule((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRuos    c`s|jrtd|nt|_|jj|_|j|j_|jj|_|jrgfd}||j_SdSdS(NsCannot enter %r twicec`sjt||dS(N(RRj(R]R!(tlog(sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt showwarnings( R|t RuntimeErrorR8R{tfilterst_filtersRt _showwarningRyRc(RrR((RsF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt __enter__ws    cC`s>|jstd|n|j|j_|j|j_dS(Ns%Cannot exit %r without entering first(R|RRR{RRR(Rr((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt__exit__s N(R3R4R5R;RcRuRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRwVs cc`sqt}t\}|j|}dVt|dksg|dk rNd|nd}td|nWdQXdS(Nis when calling %sRAsNo warning raised(R8R2R}R\RcRC(t warning_classRREtsupRtname_str((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt_assert_warns_contexts cO`sQ|st|S|d}|d}t|d|j|||SWdQXdS(s Fail unless the given callable throws the specified warning. A warning of class warning_class should be thrown by the callable when invoked with arguments args and keyword arguments kwargs. If a different type of warning is thrown, it will not be caught. If called with all arguments other than the warning class omitted, may be used as a context manager: with assert_warns(SomeWarning): do_something() The ability to be used as a context manager is new in NumPy v1.11.0. .. versionadded:: 1.4.0 Parameters ---------- warning_class : class The class defining the warning that `func` is expected to throw. func : callable The callable to test. \*args : Arguments Arguments passed to `func`. \*\*kwargs : Kwargs Keyword arguments passed to `func`. Returns ------- The value returned by `func`. iiRN(RR3(RR]R!tfunc((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR(s "   cc`s~t}tjdt`}tjddVt|dkrt|dk rUd|nd}td||fnWdQXdS(NR}talwaysis when calling %sRAsGot warnings%s: %s(R8Rxtcatch_warningst simplefilterR\RcRC(RRERR((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt_assert_no_warnings_contexts cO`sK|s tS|d}|d}td|j|||SWdQXdS(s: Fail if the given callable produces any warnings. If called with all arguments omitted, may be used as a context manager: with assert_no_warnings(): do_something() The ability to be used as a context manager is new in NumPy v1.11.0. .. versionadded:: 1.7.0 Parameters ---------- func : callable The callable to test. \*args : Arguments Arguments passed to `func`. \*\*kwargs : Kwargs Keyword arguments passed to `func`. Returns ------- The value returned by `func`. iiRN(RR3(R]R!R((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR)s   tbinaryic #`s'd}d}xtdD]xtdtd|D]|dkrfd}tfd}|||dffV|}|||d ffV|d |d |d d dffV|d |d |d d dffV|d |d |d d d ffV|d |d |d d d ffVn|d kr@fd}fd} tfd}||| |dffV|}||| |dffV| }||||dffV|d |d | d |d d dffV|d |d | d |d d dffV|d |d | d |d d dffV|d |d | d |d d d ffV|d |d | d |d d d ffV|d |d | d |d d d ffVq@q@WqWdS(s generator producing data with different alignment and offsets to test simd vectorization Parameters ---------- dtype : dtype data type to produce type : string 'unary': create data for unary operations, creates one input and output array 'binary': create data for unary operations, creates two input and output array max_size : integer maximum size of data to produce Returns ------- if type is 'unary' yields one output, one input array and a message containing information on the data if type is 'binary' yields one output array, two input array and a message containing information on the data s,unary offset=(%d, %d), size=%d, dtype=%r, %ss1binary offset=(%d, %d, %d), size=%d, dtype=%r, %siitunaryc`stdS(NR(R ((RtoR (sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR RARs out of placesin placeiitaliasedRc`stdS(NR(R ((RRR (sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR  RAc`stdS(NR(R ((RRR (sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR !RAs in place1s in place2N(R[RUR ( RRJtmax_sizetufmttbfmttinpR RKtinp1tinp2((RRR sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt_gen_alignment_datasT' $ !   #   ###!#!#!cB`seZdZRS(s/Ignoring this exception due to disabled feature(R3R4R5(((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR+9sco`s-t||}z |VWdtj|XdS(sContext manager to provide a temporary test folder. All arguments are passed as this to the underlying tempfile.mkdtemp function. N(Rtshutiltrmtree(R]R!ttmpdir((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR/=s co`s@t||\}}tj|z |VWdtj|XdS(sContext manager for temporary files. Context manager that returns the path to a closed temporary file. Its parameters are the same as for tempfile.mkstemp and are passed directly to that function. The underlying file is removed when the context is exited, so it should be closed at that time. Windows does not allow a temporary file to be opened if it is already open, so the underlying file must be closed after opening before it can be opened again. N(RRRtremove(R]R!tfdRr((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR.Ls   cB`s5eZdZdZeddZdZdZRS(s  Context manager that resets warning registry for catching warnings Warnings can be slippery, because, whenever a warning is triggered, Python adds a ``__warningregistry__`` member to the *calling* module. This makes it impossible to retrigger the warning in this module, whatever you put in the warnings filters. This context manager accepts a sequence of `modules` as a keyword argument to its constructor and: * stores and removes any ``__warningregistry__`` entries in given `modules` on entry; * resets ``__warningregistry__`` to its previous state on exit. This makes it possible to trigger any warning afresh inside the context manager without disturbing the state of warnings outside. For compatibility with Python 3.0, please consider all arguments to be keyword-only. Parameters ---------- record : bool, optional Specifies whether warnings should be captured by a custom implementation of ``warnings.showwarning()`` and be appended to a list returned by the context manager. Otherwise None is returned by the context manager. The objects appended to the list are arguments whose attributes mirror the arguments to ``showwarning()``. modules : sequence, optional Sequence of modules for which to reset warnings registry on entry and restore on exit. To work correctly, all 'ignore' filters should filter by one of these modules. Examples -------- >>> import warnings >>> with clear_and_catch_warnings(modules=[np.core.fromnumeric]): ... warnings.simplefilter('always') ... warnings.filterwarnings('ignore', module='np.core.fromnumeric') ... # do something that raises a warning but ignore those in ... # np.core.fromnumeric cC`sAt|j|j|_i|_tt|jd|dS(NR}(tsettuniont class_modulesRzt_warnreg_copiestsuperR,Ru(RrR}Rz((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRus cC`s_xI|jD]>}t|dr |j}|j|j|<|jq q Wtt|jS(Nt__warningregistry__( RzR0RRRtclearRR,R(Rrtmodtmod_reg((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRs  cG`svtt|j|xY|jD]N}t|drE|jjn||jkr |jj|j|q q WdS(NR( RR,RRzR0RRRtupdate(Rrtexc_infoR((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRs (((R3R4R5RR;RuRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR,bs ( cB`seZdZddZdZedd edZedd dZ edd dZ dZ d Z d Z d ZRS( s Context manager and decorator doing much the same as ``warnings.catch_warnings``. However, it also provides a filter mechanism to work around http://bugs.python.org/issue4180. This bug causes Python before 3.4 to not reliably show warnings again after they have been ignored once (even within catch_warnings). It means that no "ignore" filter can be used easily, since following tests might need to see the warning. Additionally it allows easier specificity for testing warnings and can be nested. Parameters ---------- forwarding_rule : str, optional One of "always", "once", "module", or "location". Analogous to the usual warnings module filter mode, it is useful to reduce noise mostly on the outmost level. Unsuppressed and unrecorded warnings will be forwarded based on this rule. Defaults to "always". "location" is equivalent to the warnings "default", match by exact location the warning warning originated from. Notes ----- Filters added inside the context manager will be discarded again when leaving it. Upon entering all filters defined outside a context will be applied automatically. When a recording filter is added, matching warnings are stored in the ``log`` attribute as well as in the list returned by ``record``. If filters are added and the ``module`` keyword is given, the warning registry of this module will additionally be cleared when applying it, entering the context, or exiting it. This could cause warnings to appear a second time after leaving the context if they were configured to be printed once (default) and were already printed before the context was entered. Nesting this context manager will work as expected when the forwarding rule is "always" (default). Unfiltered and unrecorded warnings will be passed out and be matched by the outer level. On the outmost level they will be printed (or caught by another warnings context). The forwarding rule argument can modify this behaviour. Like ``catch_warnings`` this context manager is not threadsafe. Examples -------- >>> with suppress_warnings() as sup: ... sup.filter(DeprecationWarning, "Some text") ... sup.filter(module=np.ma.core) ... log = sup.record(FutureWarning, "Does this occur?") ... command_giving_warnings() ... # The FutureWarning was given once, the filtered warnings were ... # ignored. All other warnings abide outside settings (may be ... # printed/error) ... assert_(len(log) == 1) ... assert_(len(sup.log) == 1) # also stored in log attribute Or as a decorator: >>> sup = suppress_warnings() >>> sup.filter(module=np.ma.core) # module must match exact >>> @sup >>> def some_function(): ... # do something which causes a warning in np.ma.core ... pass RcC`sFt|_g|_|ddddhkr9tdn||_dS(NRR~toncetlocationsunsupported forwarding rule.(R;R|t _suppressionsRt_forwarding_rule(Rrtforwarding_rule((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRus   cC`sTttdrtjdSx0|jD]%}t|dr'|jjq'q'WdS(Nt_filters_mutatedR(R0RxRt _tmp_modulesRR(RrR~((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt_clear_registriess  RAcC`s|rg}nd}|jr|dkrFtjdd|d|nR|jjddd}tjdd|d|d||jj||j|j j ||t j |t j ||fn.|jj ||t j |t j ||f|S(NRRkRVt.s\.t$R~(RcR|RxtfilterwarningsR3treplaceRtaddRt_tmp_suppressionsRRR+tIR(RrRkRVR~R}t module_regex((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt_filters$     ( %c C`s&|jd|d|d|dtdS(s Add a new suppressing filter or apply it if the state is entered. Parameters ---------- category : class, optional Warning class to filter message : string, optional Regular expression matching the warning message. module : module, optional Module to filter for. Note that the module (and its file) must match exactly and cannot be a submodule. This may make it unreliable for external modules. Notes ----- When added within a context, filters are only added inside the context and will be forgotten when the context is exited. RkRVR~R}N(RR;(RrRkRVR~((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pytfiltersc C`s"|jd|d|d|dtS(si Append a new recording filter or apply it if the state is entered. All warnings matching will be appended to the ``log`` attribute. Parameters ---------- category : class, optional Warning class to filter message : string, optional Regular expression matching the warning message. module : module, optional Module to filter for. Note that the module (and its file) must match exactly and cannot be a submodule. This may make it unreliable for external modules. Returns ------- log : list A list which will be filled with all matched warnings. Notes ----- When added within a context, filters are only added inside the context and will be forgotten when the context is exited. RkRVR~R}(RR8(RrRkRVR~((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR}0sc C`s0|jrtdntj|_tj|_|jt_t|_g|_t |_ t |_ g|_ x|j D]\}}}}}|dk r|2n|dkrtjdd|d|qz|jjddd}tjdd|d|d||j j|qzW|jt_|j|S( Ns%cannot enter suppress_warnings twice.RRkRVRs\.RR~(R|RRxRt _orig_showRRR8RRRt _forwardedRRRcRR3RRRR(RrtcattmessR*RRR((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRNs0             cG`s;|jt_|jt_|jt|_|`|`dS(N(RRxRRRRR;R|(RrR((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRns     cO`s;|jdd}x|j|jdddD]\}} } } } t||r0| j|jddk r0| dkr| dk rt|||||} |jj | | j | ndS| j j |r!| dk rt|||||} |jj | | j | ndSq0q0W|j dkrp|dkr_|j ||||||n |j|dS|j dkr|j|f}nK|j dkr|j||f}n'|j dkr|j|||f}n||jkrdS|jj||dkr*|j ||||||n |j|dS(Nt use_warnmsgiiRRR~R(RRcRRt issubclassRR]RjRRR RRRt _orig_showmsgRR(RrRVRkRRlR]R!RRR*tpatternRtrecR?t signature((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyRvsL0             c`s"tfd}|S(s_ Function decorator to apply certain suppressions to a whole function. c`s||SWdQXdS(N((R]R!(RRr(sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pytnew_funcs(R(RrRR((RRrsF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyt__call__sN(R3R4R5RuRtWarningRcR;RRR}RRRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyR2sF   4(RR(_R5t __future__RRRRRRRRxt functoolsRRRt contextlibttempfileRRt unittest.caseRRHRR R R R R Rtnumpy.lib.utilsRR"tioRt__all__RR-tKnownFailureTestR"RzR0tgetattrRcR1R@R$RNRSRURRRuRtplatformtgetpidRR8RRRRRRRRRR!RR RRR&RR#RLR*R%R'RVRgRcRlRjRwtcontextmanagerRR(RR)RR+R/R.RR,R2(((sF/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/utils.pyts       4                 )zb  kDlI  F.   /0  9 ?- 6  !9 + $EA