bgdydZddlZddlZddlZddlZddlZddlZddlZddlZ ddl m Z m Z m Z mZmZmZmZddlmZ ddlZdZn #e$rdZYnwxYwGddZGd d eZGd d eZGd deZGddeZGddeZGddZGddeZGddeZGddeZ GddeZ!GddeZ"Gdd eZ#Gd!d"eZ$Gd#d$eZ%Gd%d&eZ&Gd'd(eZ'Gd)d*eZ(Gd+d,eZ)Gd-d.eZ*Gd/d0eZ+Gd1d2eZ,Gd3d4eZ-Gd5d6eZ.Gd7d8eZ/Gd9d:eZ0Gd;deZ2Gd?d@eZ3GdAdBeZ4e j5dCj6e j5dCj7dDdEdFZ8ej9:dGe8;e8HGdIdJeZ<GdKdLeZ=GdMdNeZ>GdOdPeZ?GdQdReZ@GdSdTeZAGdUdVeZBGdWdXeZCGdYdZeZDGd[d\eZEej9:d]gd^d_ZFej9Gd`GdadbZHGdcddeZIGdedfeZJGdgdheZKdS)iz Tests related to deprecation warnings. Also a convenient place to document how deprecations should eventually be turned into errors. N) assert_raises assert_warnsassert_assert_array_equalSkipTestKnownFailureException break_cyclesfromstring_null_term_c_apiTFcLeZdZdZeZdZdZdddej difdZ difdZ d S) _DeprecationTestCasectjd|_|j|_tjd|jtjd|j|jdS)NT)recordalways)categorymessager)warningscatch_warningswarn_ctx __enter__logfilterwarnings warning_clsrselfs u/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py setup_methodz!_DeprecationTestCase.setup_method#sw /t<<< =**,, 43CDDDD$,)-)9 ; ; ; ; ; ;c8|jdSN)r__exit__rs rteardown_methodz$_DeprecationTestCase.teardown_method1s      r Fc&d}g|jdd<|tjur|jf} ||i|n #|rtn t $rYnwxYwd} |jD]<} | j|jur| dz } |s$td|jjd| j=|V| |krPdt|j|fz} d|jD} td | g| ztj 5tj d |j|j  ||i||t krtd n,#|$r$|t krtd YnwxYwddddS#1swxYwYdS)aTest if DeprecationWarnings are given and raised. This first checks if the function when called gives `num` DeprecationWarnings, after that it tries to raise these DeprecationWarnings and compares them with `exceptions`. The exceptions can be different for cases where this code path is simply not anticipated and the exception is replaced. Parameters ---------- function : callable The function to test num : int Number of DeprecationWarnings to expect. This should normally be 1. ignore_others : bool Whether warnings of the wrong type should be ignored (note that the message is not checked) function_fails : bool If the function would normally fail, setting this will check for warnings inside a try/except block. exceptions : Exception or tuple of Exceptions Exception to expect when turning the warnings into an error. The default checks for DeprecationWarnings. If exceptions is empty the function is expected to run successfully. args : tuple Arguments for `function` kwargs : dict Keyword arguments for `function` TNrr%z expected z but got: z"%i warnings found but %i expected.c,g|]}t|Sr&)str).0ws r z:_DeprecationTestCase.assert_deprecated..ms,,,a3q66,,,r  errorrz$No error raised during function callz!Error raised during function call)rnp_NoValuer ExceptiontuplerAssertionError__name__lenjoinrrrr) rfunctionnum ignore_othersfunction_fails exceptionsargskwargs__tracebackhide__ num_foundwarningmsglsts rassert_deprecatedz&_DeprecationTestCase.assert_deprecated4sB!  $ $*,J  Hd %f % % % %+8     D  x G GG4#333Q " G$n)222G4D4DFGGG G ?yC//6#dh--9MMC,,48,,,C C53;!7!788 8  $ & & A A  #GT\-1-= ? ? ? ? A$)&)))(((BDDD) A A A(((?AAA)( A A A A A A A A A A A A A A A A A A AsE/A  A "F#)E  F &E63F5E66FF  F cT||ddt||dS)zTest that warnings are not raised. This is just a shorthand for: self.assert_deprecated(function, num=0, ignore_others=True, exceptions=tuple(), args=args, kwargs=kwargs) rT)r8r9r;r<r=N)rCr2)rr7r<r=s rassert_not_deprecatedz*_DeprecationTestCase.assert_not_deprecated}sA xQd#(77f  F F F F Fr N) r4 __module__ __qualname__rDeprecationWarningrrr$r/r0rCrEr&r rr r sG$K ; ; ;!!!/0u).%'[!"GAGAGAGAR46b F F F F F Fr r ceZdZejZdS)_VisibleDeprecationTestCaseN)r4rFrGr/VisibleDeprecationWarningrr&r rrJrJs.KKKr rJcdeZdZdZdZeje ddZ dS)TestDatetime64Timezonea{Parsing of datetime64 with timezones deprecated in 1.11.0, because datetime64 is now timezone naive rather than UTC only. It will be quite a while before we can remove this, because, at the very least, a lot of existing code uses the 'Z' modifier to avoid conversion from local time to UTC, even if otherwise it handles time in a timezone naive fashion. c|tjd|tjddS)N)z2000-01-01T00+01r<)z2000-01-01T00Z)rCr/ datetime64rs r test_stringz"TestDatetime64Timezone.test_strings@ r}3HIII r}3FGGGGGr z!The pytz module is not available.)reasonctjd}tjddddd|}|tj|fdS)Nz US/Easternir%r)tzinforO)pytztimezonedatetimerCr/rP)rtzdts r test_datetimez$TestDatetime64Timezone.test_datetimesS]< ( (  tQ1a ; ; ; r}B599999r N) r4rFrG__doc__rQpytestmarkskipif _has_pytzrZr&r rrMrMspHHH [I BDD::DD:::r rMceZdZdZdZdS)+TestArrayDataAttributeAssignmentDeprecationaSAssigning the 'data' attribute of an ndarray is unsafe as pointed out in gh-7093. Eventually, such assignment should NOT be allowed, but in the interests of maintaining backwards compatibility, only a Deprecation- Warning will be raised instead for the time being to give developers time to refactor relevant code. ctjd}tjddd}d|_||jd|jfdS)N rr%zcAssigning the 'data' attribute is an inherently unsafe operation and will be removed in the future.datarO)r/arangelinspacerrC __setattr__rd)rabs rtest_data_attr_assignmentzETestArrayDataAttributeAssignmentDeprecation.test_data_attr_assignmentsU IbMM K1b ! !4  q}FAF3CDDDDDr N)r4rFrGr[rjr&r rraras2EEEEEr raceZdZdZdZdZdS)9TestBinaryReprInsufficientWidthParameterForRepresentationa If a 'width' parameter is passed into ``binary_repr`` that is insufficient to represent the number in base 2 (positive) or 2's complement (negative) form, the function used to silently ignore the parameter and return a representation using the minimal number of bits needed for the form in question. Such behavior is now considered unsafe from a user perspective and will raise an error in the future. cdd}ddi}d|_|tj||dS)N)rcwidthQInsufficient bit width provided. This behavior will raise an error in the future.r<r=rrCr/ binary_reprrr<r=s r test_insufficient_width_positivezZTestBinaryReprInsufficientWidthParameterForRepresentation.test_insufficient_width_positive<1=  r~DHHHHHr cdd}ddi}d|_|tj||dS)N)rnrorprqrrrts r test_insufficient_width_negativezZTestBinaryReprInsufficientWidthParameterForRepresentation.test_insufficient_width_negativervr N)r4rFrGr[ruryr&r rrlrlsDIIIIIIIIr rlceZdZdZdZdS)$TestDTypeAttributeIsDTypeDeprecationz.*`.dtype` attributecGddGddtj|fd|fd|fd|fddS) NceZdZdZdS)ZTestDTypeAttributeIsDTypeDeprecation.test_deprecation_dtype_attribute_is_dtype..dtf8Nr4rFrGdtyper&r rrYr~sEEEr rYceZdZdZdS)[TestDTypeAttributeIsDTypeDeprecation.test_deprecation_dtype_attribute_is_dtype..vdtzf,fNrr&r rvdtrsEEEr rc,tjSr"r/rrYsrz`TestDTypeAttributeIsDTypeDeprecation.test_deprecation_dtype_attribute_is_dtype..srx||r c<tjSr"rrsrrz`TestDTypeAttributeIsDTypeDeprecation.test_deprecation_dtype_attribute_is_dtype..srx~~r c,tjSr"rrsrrz`TestDTypeAttributeIsDTypeDeprecation.test_deprecation_dtype_attribute_is_dtype..srx}}r c>tjdSNr%rrsrrz`TestDTypeAttributeIsDTypeDeprecation.test_deprecation_dtype_attribute_is_dtype..srxA'7'7r )r/voidrC)rrYrs @@r)test_deprecation_dtype_attribute_is_dtypezNTestDTypeAttributeIsDTypeDeprecation.test_deprecation_dtype_attribute_is_dtypes             "'    3333444 5555666 4444555 777788888r N)r4rFrGrrr&r rr{r{s(%G 9 9 9 9 9r r{ceZdZdZdS)TestTestDeprecatedct}|tt|jdd}|||dS)NcdSr"r&r&r rrz;TestTestDeprecated.test_assert_deprecated..sdr c>tjdtddS)Nfooro)r stacklevel)rwarnrHr&r rrz6TestTestDeprecated.test_assert_deprecated..foos M%*< K K K K K Kr )r rrr3rCr$)rtest_case_instancers rtest_assert_deprecatedz)TestTestDeprecated.test_assert_deprecateds133'')))n(:"l $ $ $ L L L ,,S111**,,,,,r N)r4rFrGrr&r rrrs# - - - - -r rceZdZdZdZdS)TestNonNumericConjugatez Deprecate no-op behavior of ndarray.conjugate on non-numeric dtypes, which conflicts with the error behavior of np.conjugate. cdtjdtjdfD]}||jtjdtjddtjddtfdtfgfD]}||jdS) Ny@s2016M)r%rorhri)r/arrayrE conjugateintrCrrhs rtest_conjugatez&TestNonNumericConjugate.test_conjugates!bhrll* 4 4A  & &q{ 3 3 3 3(3--&#!6!63*sCj!9::< 0 0A  " "1; / / / / 0 0r N)r4rFrGr[rr&r rrrs-00000r rceZdZdZdS) TestNPY_CHARcrddlm}||t|dkdS)Nr)npy_char_deprecationS1)numpy.core._multiarray_testsrrCr)rrs rtest_npy_char_deprecationz&TestNPY_CHAR.test_npy_char_deprecationsLEEEEEE 3444$$&&$./////r N)r4rFrGrr&r rrrs#00000r rceZdZdZdS)TestPyArray_AS1Dc<ddlm}tt|dS)Nr)npy_pyarrayas1d_deprecation)rrrNotImplementedError)rrs r test_npy_pyarrayas1d_deprecationz1TestPyArray_AS1D.test_npy_pyarrayas1d_deprecation,LLLLLL)+FGGGGGr N)r4rFrGrr&r rrr(HHHHHr rceZdZdZdS)TestPyArray_AS2Dc<ddlm}tt|dS)Nr)npy_pyarrayas2d_deprecation)rrrr)rrs r test_npy_pyarrayas2d_deprecationz1TestPyArray_AS2D.test_npy_pyarrayas2d_deprecation rr N)r4rFrGrr&r rrr rr rceZdZdZdS)TestDatetimeEventcPtjtjfD]}||d||d||d||d||d||ddS)N)r%)msrorO)r%)rror%N)r%)rroevent)r%)rro?)r%)rror%r)r%)rror%r)r/rP timedelta64rErC)rclss r test_3_tuplezTestDatetimeEvent.test_3_tuplesM2>2 D DC  & &s & @ @ @  & &s1H & I I I  " "3-D " E E E  " "3-? " @ @ @  " "3-G " H H H  " "3-B " C C C C D Dr N)r4rFrGrr&r rrrs( D D D D Dr rceZdZdZdZdZdS)TestTruthTestingEmptyArraysz..*truth value of an empty array is ambiguous.*cd|ttjgfdSNrO)rCboolr/rrs rtest_1dz#TestTruthTestingEmptyArrays.test_1d#s+ t28B<>> t28F+;+;*=>>> t28F+;+;*=>>>>>r N)r4rFrGrrrr&r rrrs7>G;;;?????r rceZdZdZdS) TestBincountc2|ddS)Nc2tjgddS)Nr%ro) minlength)r/bincountr&r rrz6TestBincount.test_bincount_minlength../sr{999'M'M'Mr rCrs rtest_bincount_minlengthz$TestBincount.test_bincount_minlength.s  MMNNNNNr N)r4rFrGrr&r rrr,s(OOOOOr rceZdZdZdS)TestGeneratorSumcx|tjdtdDfdS)Nc3K|]}|VdSr"r&)r*is r z6TestGeneratorSum.test_generator_sum..6s"-B-BAa-B-B-B-B-B-Br rrO)rCr/sumrangers rtest_generator_sumz#TestGeneratorSum.test_generator_sum5s; rv-B-Bq-B-B-B,DEEEEEr N)r4rFrGrr&r rrr3s(FFFFFr rceZdZdZdS)TestFromstringcH|tjddS)N)zPrO)rCr/ fromstringrs rtest_fromstringzTestFromstring.test_fromstring;s# r}<@@@@@r N)r4rFrGrr&r rrr9s(AAAAAr rceZdZdZejdddgdZejdddgdZdS) TestFromStringAndFileInvalidDataz+string or file could not be read to its end invalid_strz ,invalid_data invalid_sepctjgdt}tjd5|dd|d|fd d|fd tj 5tj d tdtj dd }t||dddn #1swxYwYddddS#1swxYwYdS)Ng)\(?rogGz @rr+mode,z%.2f)sepformatrc0tjdSNr)rr/fromfilefsrrzVTestFromStringAndFileInvalidData.test_deprecate_unparsable_data_file..Ms2;qc+B+B+Br c2tjddSNrrrcountrrsrrzVTestFromStringAndFileInvalidData.test_deprecate_unparsable_data_file..Os2;qc+K+K+Kr r.rr)r/rfloattempfile TemporaryFiletofilewriteseekrCrr simplefilterrHrr)rrxresrs @r#test_deprecate_unparsable_data_filezDTestFromStringAndFileInvalidData.test_deprecate_unparsable_data_fileDs H'''u 5 5 5  # - - - + HHQCH / / / GGK FF1III  " "#B#B#B#B C C C FF1III  " "#K#K#K#K L L L(** + +%g/ABBBq k!A666"3***  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +s7BE AD2& E 2D6 6E 9D6 :E  EEctjgdt}d||fd|fdd|fdt t5tjdd }t|dd |dddn #1swxYwYtj 5tj d ttjdd }t||ddddS#1swxYwYdS)Nrrz1.51,2,3.51,4{}c0tjdSrr/rx_strsrrzSTestFromStringAndFileInvalidData.test_deprecate_unparsable_string..\sr}U'D'D'Dr c2tjddSrrrsrrzSTestFromStringAndFileInvalidData.test_deprecate_unparsable_string..]sr}U1'M'M'Mr asciic"tSr"r )bytestrsrrzSTestFromStringAndFileInvalidData.test_deprecate_unparsable_string..bs'A''J'Jr rrrr.r) r/rrrrCencoderrHrrrrr)rrrrr r s @@r test_deprecate_unparsable_stringzATestFromStringAndFileInvalidData.test_deprecate_unparsable_stringWs H'''u 5 5 5!((55 DDDDEEE MMMMNNN,,w'' JJJJKKK , - - , ,-3a888C s3B3x + + +  , , , , , , , , , , , , , , , $ & & ' '  !'+= > > >-3a888C sA & & &  ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 's%&0C""C&)C&AEEEN) r4rFrGrr\r] parametrizerrr&r rrr?s.rz"(1++'>'>r cNtjtjdSrr$r&r rrz(TestNonZero.test_zerod..r&r rrs r test_zerodzTestNonZero.test_zerods8 >>??? >>?????r N)r4rFrGr(r&r rr!r!s(@@@@@r r!c:eZdZejdZdZdZdS) TestToStringz0tostring() is deprecated. Use tobytes() instead.ctjtdtj}||jdSNstestr)r/rlistuint8rCtostringrarrs r test_tostringzTestToString.test_tostrings<htK((999 s|,,,,,r ctjtdtj}|}t t 5|}dddn #1swxYwY||ksJdSr,)r/rr-r.tobytesrrHr/)rr1rirs rtest_tostring_matches_tobytesz*TestToString.test_tostring_matches_tobytesshtK((999 KKMM , - -   A               AvvvvvvsA77A;>A;N)r4rFrGreescaperr2r5r&r rr*r*sDbiJKKG---r r*c eZdZdZejejejejej ej ej ej ej ejg ZdZdZdZdS)TestDTypeCoercionz(Converting .* to a dtype .*is deprecatedc^|jD]$}|tj|f%dSr)deprecated_typesrCr/rr scalar_types rtest_dtype_coercionz%TestDTypeCoercion.test_dtype_coercionsB0 B BK  " "28;. " A A A A B Br c`|jD]%}|tjg|f&dSr)r;rCr/rr<s rtest_array_constructionz)TestDTypeCoercion.test_array_constructionsE0 F FK  " "282{2D " E E E E F Fr ctjD])}|D]$}|tj|f%*t t ttfD]$}|tj|f%dSr) r/sctypesvaluesrErtypedictr-r2)rgroupr=s rtest_not_deprecatedz%TestDTypeCoercion.test_not_deprecatedsZ&&(( J JE$ J J **28;.*IIII J!$e4 F FK  & &rx{n & E E E E F Fr N)r4rFrGrr/genericflexiblenumberinexactfloatingcomplexfloatingintegerunsignedinteger signedinteger characterr;r>r@rGr&r rr9r9s8G BK BK!3 B&(8 BBBFFFFFFFFr r9c eZdZejejejgZejej ej ej ej ej ejejejejejg ZdZdZdS)BuiltInRoundComplexDTypec|jD]h}|d}|t|f|t|df|t|fddiidSNrrOndigitsrq)r;rCroundrr=scalars rtest_deprecatedz(BuiltInRoundComplexDType.test_deprecateds0 Q QK [^^F  " "5y " 9 9 9  " "5{ " ; ; ;  " "5y)Q " P P P P  Q Qr c|jD]h}|d}|t|f|t|df|t|fddiidSrU)not_deprecated_typesrErWrXs rrGz,BuiltInRoundComplexDType.test_not_deprecateds4 U UK [^^F  & &uF9 & = = =  & &uFA; & ? ? ?  & &uF9iQR^ & T T T T  U Ur N)r4rFrGr/csinglecdouble clongdoubler;int8int16int32int64r.uint16uint32uint64float16float32float64r\rZrGr&r rrSrSs BJ? 28RX ")RY  BJ  QQQUUUUUr rScveZdZdZejdddgfddgddgfgdZdZdS))TestIncorrectAdvancedIndexWithEmptyResultz7Out of bound index found. This was previously ignored.*indexrrcjtjd}||j|f||j|dftjd}t ddf|z}||j|f||j|dfdS)N)rororrO)roror%r)r/onesrC __getitem__ __setitem__slice)rrlr1arr2index2s rtest_empty_subspacez=TestIncorrectAdvancedIndexWithEmptyResult.test_empty_subspacesgi   seX>>> seR[AAAwy!!1++%' t/vi@@@ t/vrlCCCCCr ctjd}dgdgggf}||j|f||j|tjdfdS)N)rorororrorO)rorro)r/rorErprqempty)rr1rls r)test_empty_index_broadcast_not_deprecatedzSTestIncorrectAdvancedIndexWithEmptyResult.test_empty_index_broadcast_not_deprecatedsgi  #sR  ""3?%"BBB ""3?).0C0C(D # F F F F Fr N) r4rFrGrr\r]rrurxr&r rrkrksuGG [WAyAq6Aq62B&CDD D DED DFFFFFr rkceZdZdZdS)TestNonExactMatchDeprecationctjgdgdg|fd|fddS)N)rr|)rrr%c2tjddS)N)r|Cilpr)r/ravel_multi_indexr1srrzCTestNonExactMatchDeprecation.test_non_exact_match..sr';Cf'U'U'Ur c>tjdddS)NrrRandom)side)r/ searchsortedrsrrzCTestNonExactMatchDeprecation.test_non_exact_match..srs1vqx'P'P'Pr )r/rrCr0s @rtest_non_exact_matchz1TestNonExactMatchDeprecation.test_non_exact_matchsah 999-.. UUUUVVV PPPPQQQQQr N)r4rFrGrr&r rrzrzs(RRRRRr rzceZdZdZdZdS)TestMatrixInOuterzCadd.outer\(\) was passed a numpy matrix as (first|second) argument.ctjgd}tjgdtj}|tjj||fd|tjj||f|tjj||f|tjj||fdS)Nrro)r<r8rO)r/rviewmatrixrCrouterrE)rr1ms rrZz!TestMatrixInOuter.test_deprecatedshyyy!! HYYY   $ $RY / / rv|1a&a@@@ rv|3(;;; rv|1c(;;; ""26tbTl_ $RXarx-H-H-H#+-- # . . . 9 % % 0 0 NRD2$.(sttBHSMM1'='=r )r/core multiarrayrYrC)rrs @rrZz2TestDeprecatedUnpickleObjectScalar.test_deprecated&s4w!( ====>>>>>r N)r4rFrGr[rrZr&r rrrs5 EG?????r rceZdZdZdZdS)TestSingleElementSignaturezThe use of a length 1c^|d|ddS)Nc0tjdddS)Nr%rod) signature)r/rr&r rrz.0srvac'B'B'Br cVtjddtjdfS)Nr%rol)sig)r/rrr&r rrz.1s"rva#8H'I'I'Ir rrs rrZz*TestSingleElementSignature.test_deprecated/s8 BBCCC IIJJJJJr Nrr&r rrr+s-&GKKKKKr rceZdZeZejdgjZej dgdde ddfdZ ej dgdde ddfdZ dS) TestCtypesGetterr%name)get_data get_shape get_stridesget_as_parameterreturnNcbt|j||fddS)NcSr"r&funcsrrz2TestCtypesGetter.test_deprecated..>s ttvvr )getattrctypesrC)rrrs @rrZz TestCtypesGetter.test_deprecated9s6t{D)) ~~~~.....r )rdshapestrides_as_parameter_c<fddS)Nc.tjSr")rr)rrsrrz6TestCtypesGetter.test_not_deprecated..Ds74;+E+Er rE)rrs``rrGz$TestCtypesGetter.test_not_deprecated@s- ""#E#E#E#E#EFFFFFr )r4rFrGrHrr/rrr\r]rr)rZrGr&r rrr4s$K RXqc]] !F [LLL/C/D//// [>>>GGGGGGGGr rrccPtjtjd|SNrc)r/ partitionrekths rrrJsbl29R==#&F&Fr cPtjtjd|Sr)r/ argpartitionrers rrrKs2)L)Lr )zpartition methodzargpartition methodzpartition functionzargpartition functionr)idsc"eZdZeZdZdZdZdS)TestPartitionBoolIndexz1Passing booleans as partition index is deprecatedch|fd|fddS)NcdS)NTr&rsrrz8TestPartitionBoolIndex.test_deprecated..VsttDzzr cddgS)NFTr&rsrrz8TestPartitionBoolIndex.test_deprecated..WsttUDM':':r rrrs `rrZz&TestPartitionBoolIndex.test_deprecatedUsE 1111222 ::::;;;;;r ch|fd|fddS)NcdSrr&rsrrz.Zs4477r cddgS)Nrr%r&rsrrz.[s44A<<r rrs `rrGz*TestPartitionBoolIndex.test_not_deprecatedYsA ""????333 ""#7#7#7#788888r N)r4rFrGrHrrrZrGr&r rrrOs>%KAG<<<99999r rceZdZeZdZdS) TestMachArc2|ddS)Nc6ttjdS)NMachAr)rr/rr&r rrz3TestMachAr.test_deprecated_module..cswrw'A'Ar rrs rtest_deprecated_modulez!TestMachAr.test_deprecated_modulebs  AABBBBBr N)r4rFrGrHrrr&r rrr^s-$KCCCCCr rceZdZejdejejej ej gdZ ejdejejej ej gdZ dS)$TestQuantileInterpolationDeprecationrch|fd|fddS)Nc$ddgddS)Nrnrlinear interpolationr&rsrrzFTestQuantileInterpolationDeprecation.test_deprecated..lsDD"b2X>>>r c$ddgddS)Nrnrnearestrr&rsrrzFTestQuantileInterpolationDeprecation.test_deprecated..nsDD"b2Y???r rrs `rrZz4TestQuantileInterpolationDeprecation.test_deprecatedhs_  > > > > @ @ @  ? ? ? ? A A A A Ar ctj5tjdtt jt 5|ddgddddddn #1swxYwYddddS#1swxYwYdS)Nrrnrr)rmethod)rrrrHr\raisesrrs rtest_both_passedz5TestQuantileInterpolationDeprecation.test_both_passedps2 $ & & N N  !(,> ? ? ?y)) N Nb"Xr9MMMM N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N Ns54A>A& A>&A* *A>-A* .A>>BBN) r4rFrGr\r]rr/ percentilequantile nanpercentile nanquantilerZrr&r rrrfs [V  R%5r~FHHAAHHA  [V ]BK)92> JLLNNLLNNNr rceZdZdZdS)TestMemEventHookc|ddlmcm}tjt d5|dddn #1swxYwYtjd}~ttjt d5| ddddS#1swxYwYdS)Nrz$PyDataMem_SetEventHook is deprecatedmatchi) rr_multiarray_testsr\warnsrH!test_pydatamem_seteventhook_startr/rr test_pydatamem_seteventhook_end)rma_testsrhs rtest_mem_seteventhookz&TestMemEventHook.test_mem_seteventhook|sW 877777777 \, FHHH 9 9  6 6 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 HTNN  \, FHHH 7 7  4 4 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7s#AA  A B11B58B5N)r4rFrGrr&r rrrzs#77777r rceZdZdZdZdS)TestArrayFinalizeNonez!Setting __array_finalize__ = NonechGddtj|fddS)NceZdZdZdS)ETestArrayFinalizeNone.test_use_none_is_deprecated..NoFinalizeN)r4rFrG__array_finalize__r&r r NoFinalizers!%   r rcRtjdSr)r/rr)rsrrzCTestArrayFinalizeNone.test_use_none_is_deprecated..srx{{'7'7 'C'Cr )r/ndarrayrC)rrs @rtest_use_none_is_deprecatedz1TestArrayFinalizeNone.test_use_none_is_deprecatedsU & & & & & & & & CCCCDDDDDr N)r4rFrGrrr&r rrrs-1GEEEEEr rceZdZdZdZdS)TestAxisNotMAXDIMSz)Using `axis=32` \(MAXDIMS\) is deprecatedc`tjd|fddS)N) r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%cFtjdtjS)Nr%)r)r/repeatMAXDIMS)rhsrrz4TestAxisNotMAXDIMS.test_deprecated..sryABJ'G'G'Gr )r/rrCrs @rrZz"TestAxisNotMAXDIMS.test_deprecateds6 HW   GGGGHHHHHr Nrr&r rrrs-:GIIIIIr rceZdZdZejdejddZ ejdejddZ dS)TestLoadtxtParseIntsViaFloatz;loadtxt\(\): Parsing an integer via a float is deprecated.*r AllIntegerctjt|j5t jdg|ddddS#1swxYwYdS)Nr10.5r)r\rrHrr/loadtxt)rrs rtest_deprecated_warningz4TestLoadtxtParseIntsViaFloat.test_deprecated_warnings \,DL A A A . . Jxu - - - - . . . . . . . . . . . . . . . . . .sAA  A c*tj5tjdt t jdg|n3#t $r&}t|jtsJYd}~nd}~wwxYwddddS#1swxYwYdS)Nr.rr) rrrrHr/rr isinstance __cause__)rres rtest_deprecated_raisedz3TestLoadtxtParseIntsViaFloat.test_deprecated_raiseds  $ & & C C  !'+= > > > C F8511111 C C C!!+/ABBBBBBBBBB C  C C C C C C C C C C C C C C C C C Cs:BAB A8A3.B3A88BB B N) r4rFrGrr\r]rr/ typecodesr rr&r rrrsMG [Wbl<&@AA..BA. [Wbl<&@AACCBACCCr rceZdZdZdZdS)TestScalarConversioncf|ttjdgfdS)NQ @rO)rCrr/rrs rtest_float_conversionz*TestScalarConversion.test_float_conversions0 uBHdV,<,<+>?????r ctjdgg}tjd}tjt 5||d<ddddS#1swxYwYdS)Nrrr)r/rrr\rrH)rrics rtest_behaviourz#TestScalarConversion.test_behaviours HtfX   HQKK \, - -  AaD                  sAAAN)r4rFrGrrr&r rrrs5@@@r rcpeZdZdZejdejddZ dS)TestPyIntConversionz,.*stop allowing conversion of out-of-bound.*rrc,tjtjd}d}d}|||fD]Y |fdn#t$rYnwxYw |fdJ#t$rYVwxYwdS)Nc0||dSr")rDvaluers rrYz:TestPyIntConversion.test_deprecated_scalar..scalars JJu     r c@tjgd|}||d<dS)N)rrrrror/r)rrr1s rassignz:TestPyIntConversion.test_deprecated_scalar..assigns'(999E222CCFFFr c4tj|g|dS)Nrrrs rcreatez:TestPyIntConversion.test_deprecated_scalar..creates HeWE * * * * * *r c,jdz Sr)min creation_funcrinfosrrz. dhlE B Br c,jdzSr)maxr%srrz.r(r )r/riinforC OverflowError)rrrYr r"r&r's ` @@rtest_deprecated_scalarz*TestPyIntConversion.test_deprecated_scalarsx       + + +%ff5  M &&BBBBBBDDDD      &&BBBBBBDDDD       s#A A%$A%)B BBN) r4rFrGrr\r]rr/rr-r&r rrrsM=G [Wbl<&@AABAr rceZdZdZdS)TestDeprecatedGlobalsc|d|d|d|d|d|ddS)NctjSr")r/bool8r&r rrz9TestDeprecatedGlobals.test_type_aliases..rxr ctjSr")r/int0r&r rrz9TestDeprecatedGlobals.test_type_aliases..rwr ctjSr")r/uint0r&r rrz9TestDeprecatedGlobals.test_type_aliases..r3r ctjSr")r/bytes0r&r rrz9TestDeprecatedGlobals.test_type_aliases..sryr ctjSr")r/str0r&r rrz9TestDeprecatedGlobals.test_type_aliases..r6r ctjSr")r/object0r&r rrz9TestDeprecatedGlobals.test_type_aliases..srzr rrs rtest_type_aliasesz'TestDeprecatedGlobals.test_type_aliasess //000 /// //000 00111 /// 1122222r N)r4rFrGr?r&r rr/r/s#33333r r/r)rlongulongr)bytesobjectc|ttvsJtjtd|5t t|rJ dddn #1swxYwYtj||tjvdS)NzIn the future .*r)dirr/r\rrhasattrr sctypeDict)rs rtest_future_scalar_attributesrHs s2ww     m+T++ - - -%%2t$$$$$$%%%%%%%%%%%%%%% HTNNNBMsAA #A z"ignore:In the future:FutureWarningcZeZdZejdgddZdS)TestRemovedGlobalsr)rCrrcomplexr)rcd|d}tjt|5tt|ddddS#1swxYwYdS)Nz.* `np.z(` was a deprecated alias for the builtinr)r\rAttributeErrorrr/)rrrAs r!test_attributeerror_includes_infoz4TestRemovedGlobals.test_attributeerror_includes_infosHGGG ]> 5 5 5   B                     sAA  A N)r4rFrGr\r]rrNr&r rrJrJsS  [V @ @ @BBBBr rJceZdZdZdS)TestDeprecatedFinfocH|tjddS)Nr"rO)rCr/finfors rtest_deprecated_nonez(TestDeprecatedFinfo.test_deprecated_nones# rxg66666r N)r4rFrGrSr&r rrPrPs#77777r rPc,eZdZdZdZdZdZdZdS)TestFromnumericc2|ddS)NcRtjtjgdS)N)g?g@g @)r/round_rr&r rrz-TestFromnumeric.test_round_..sry///1J1J'K'Kr rrs r test_round_zTestFromnumeric.test_round_  KKLLLLLr c2|ddS)NcRtjtjgdSNr)r/ cumproductrr&r rrz1TestFromnumeric.test_cumproduct..sr}RXiii5H5H'I'Ir rrs rtest_cumproductzTestFromnumeric.test_cumproducts  IIJJJJJr c2|ddS)NcRtjtjgdSr])r/productrr&r rrz.TestFromnumeric.test_product.. srz"(9992E2E'F'Fr rrs r test_productzTestFromnumeric.test_products  FFGGGGGr c2|ddS)NcRtjtjddgSNTF)r/sometruerr&r rrz/TestFromnumeric.test_sometrue..$sr{28T5M3J3J'K'Kr rrs r test_sometruezTestFromnumeric.test_sometrue#rZr c2|ddS)NcRtjtjddgSrf)r/alltruerr&r rrz.TestFromnumeric.test_alltrue..(srz"(D%=2I2I'J'Jr rrs r test_alltruezTestFromnumeric.test_alltrue's  JJKKKKKr N)r4rFrGrYr_rcrhrlr&r rrUrUspMMMKKKHHHMMMLLLLLr rUceZdZdZdZdS) TestMathAliasc2|ddS)NctjSr")r/mathr&r rrz7TestMathAlias.test_deprecated_np_math...r6r rrs rtest_deprecated_np_mathz%TestMathAlias.test_deprecated_np_math-s /////r c2|ddS)Nc$tjjSr")r/librqr&r rrz;TestMathAlias.test_deprecated_np_lib_math..1s rv{r rrs rtest_deprecated_np_lib_mathz)TestMathAlias.test_deprecated_np_lib_math0s  2233333r N)r4rFrGrrrvr&r rrnrn+s200044444r rn)Lr[rWoperatorrr\rr6sysnumpyr/ numpy.testingrrrrrrr rr rUr_ ImportErrorr rJrMrarlr{rrrrrrrrrrrrrr!r*r9rSrkrzrrrrrrerrPARTITION_DICTr]rrCrrrrrrrrrr/rHrrJrPrUrnr&r rr}s     DCCCCCKKKIIIIIiFiFiFiFiFiFiFiFX/////"6///:::::1:::*EEEEE2FEEE$IIIII@TIII499999+?999" - - - - - - - - 0 0 0 0 02 0 0 000000'000HHHHH+HHH HHHHH+HHH D D D D D, D D D ? ? ? ? ?"6 ? ? ?OOOOO'OOOFFFFF+FFF AAAAA)AAA 1'1'1'1'1'';1'1'1'h A A A A A1 A A ABBBBB+BBB@@@@@&@@@     '    FFFFF,FFF>UUUUU3UUU0FFFFF0DFFF6RRRRR#7RRR B B B B B, B B B00000&:000* ? ? ? ? ?)= ? ? ?KKKKK!5KKKGGGGG+GGG(" " /$29R==5FFLL !6!6!8!8nMM 9 9 9 9 91 9 9NM 9CCCCC%CCCNNNNN+?NNN(77777+777&EEEEE0EEEIIIII-IIICCCCC#7CCC2     /   .D 3 3 3 3 30 3 3 3;;;==  == @AA       BA 77777.777 LLLLL*LLL,44444(44444sAA  A