bg 8ddlZddlmZmZGddZdS)N) assert_raisesassert_raises_regexcBeZdZdZdZdZdZdZdZdZ dZ d Z d S) TestIndexErrorsz9Tests to exercise indexerrors not covered by other tests.c"tjd}tt|jdgdtt|jdgdtt|jdgddtt|jdgddd S) ztake from a 0-length dimension)rrraxiswrap)r modeclipN)npemptyr IndexErrortake)selfxs t/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib64/python3.11/site-packages/numpy/core/tests/test_indexerrors.pytest_arraytypes_fasttakez(TestIndexErrors.test_arraytypes_fasttake s H\ " "j!&1#A6666j!&1#A6666j!&1#AFCCCCj!&1#AFCCCCCCctjdt}tt|jdgtjdt}tt|jdgdtt|jdgdtt|jdgtt|jdgd tt|jdgd dS) Ndtyperrr r rr)rr)rzerosobjectrrr)rds rtest_take_from_objectz%TestIndexErrors.test_take_from_objects HQf % % %j!&1#... HV6 * * *j!&1#A6666j!&1#A6666j!&1#...j!&1#F;;;;j!&1#F;;;;;;rctjdt}tt|jdtjdt}tt|jdtjdt}tt|jddtjdt}tt|jdddS)Nrrr)rrr)rrr!rritemitemsetras rtest_multiindex_exceptionsz*TestIndexErrors.test_multiindex_exceptionss HQf % % %j!&"--- HV6 * * *j!&&111 HQf % % %j!)R333 HV6 * * *j!)VQ77777rctjd}tt|jddtjdt }tt|jddtjd}tt|jddtjdt }tt|jdddS)N)rrdrr)rrr)rr rrputr!r(s rtest_put_exceptionsz#TestIndexErrors.test_put_exceptions*s HV  j!%a000 HV6 * * *j!%a000 HY  j!%a000 HYf - - -j!%a00000rcdtjgdttfdttfdttfdttfdtjgdttfdttfd tjgdttfd ttfd tjgdttfd ttfd tjgdttfdttfdtjgdttfdttfdtjgdttfdttfdtjgdttfdttfddS)zcases in iterators.cc|||<dSNobjindvals rassignz9TestIndexErrors.test_iterators_exceptions..assign6CHHHr)r rr cdS)NrrNrr2r)srz;TestIndexErrors.test_iterators_exceptions..: !M*:rcdS)Nrrrrr2r;srr<z;TestIndexErrors.test_iterators_exceptions..;s !J-rcddS)Nr:r r2r)r7srr<z;TestIndexErrors.test_iterators_exceptions..<&&OQ*G*GrcddS)Nr?r r2rAsrr<z;TestIndexErrors.test_iterators_exceptions..=s&&L1*E*Er)r rr cdS)NrrNrr2r;srr<z;TestIndexErrors.test_iterators_exceptions..@r=rcddS)NrEr r2rAsrr<z;TestIndexErrors.test_iterators_exceptions..ArBrcjdSN flatr;srr<z;TestIndexErrors.test_iterators_exceptions..D !&*rc(jddSNrIrrJrAsrr<z;TestIndexErrors.test_iterators_exceptions..E&&Q*?*?rcjdSrHrJr;srr<z;TestIndexErrors.test_iterators_exceptions..GrLrc(jddSrNrJrAsrr<z;TestIndexErrors.test_iterators_exceptions..HrOrcBjtjdSrHrKrarrayr;srr<z;TestIndexErrors.test_iterators_exceptions..K!&"*>rcLjtjddSrNrSrAsrr<z;TestIndexErrors.test_iterators_exceptions..L&&"q*I*IrcBjtjdSrHrSr;srr<z;TestIndexErrors.test_iterators_exceptions..NrUrcLjtjddSrNrSrAsrr<z;TestIndexErrors.test_iterators_exceptions..OrWrcDjtjdgSrHrSr;srr<z;TestIndexErrors.test_iterators_exceptions..R!&2$*@rcNjtjdgdSrNrSrAsrr<z;TestIndexErrors.test_iterators_exceptions..S!&&2$*K*KrcDjtjdgSrHrSr;srr<z;TestIndexErrors.test_iterators_exceptions..Ur[rcNjtjdgdSrNrSrAsrr<z;TestIndexErrors.test_iterators_exceptions..Vr]rNrr rrrr)r7s @@rtest_iterators_exceptionsz)TestIndexErrors.test_iterators_exceptions4s    HYYY  j":":":":;;;j"7"7"7"7888j"G"G"G"G"GHHHj"E"E"E"E"EFFF HYYY  j":":":":;;;j"G"G"G"G"GHHH HYYY  j"4"4"4"4555j"?"?"?"?"?@@@ HYYY  j"4"4"4"4555j"?"?"?"?"?@@@ HYYY  j">">">">???j"I"I"I"I"IJJJ HYYY  j">">">">???j"I"I"I"I"IJJJ HYYY  j"@"@"@"@AAAj"K"K"K"K"KLLL HYYY  j"@"@"@"@AAAj"K"K"K"K"KLLLLLrcDdtjdttfdtjdttfdttfdtjdttfdttfd tjd ttfd tjd ttfd tjdttfdttfdtjdttfdttfddS)zcases from mapping.cc|||<dSr1r2r3s rr7z,TestIndexErrors.test_mapping..assign[r8r)rrIcdS)N r2r;srr<z.TestIndexErrors.test_mapping.._s !B%rr rcdS)NrIr%r2r;srr<z.TestIndexErrors.test_mapping..bs !H+rcddS)Nrir r2rAsrr<z.TestIndexErrors.test_mapping..cs&&Ha*@*@r)r rcdS)Nr rr2r;srr<z.TestIndexErrors.test_mapping..es !F)rcddS)Nrlr r2rAsrr<z.TestIndexErrors.test_mapping..fs&&FA*>*>r)rIcddSNrIr r2rAsrr<z.TestIndexErrors.test_mapping..i&&B*:*:r)rcddSror2rAsrr<z.TestIndexErrors.test_mapping..krprcdddgfSNr r%r2r;srr<z.TestIndexErrors.test_mapping..ns!QBL/rc&dddgfdSrsr2rAsrr<z.TestIndexErrors.test_mapping..os&&QBL!*D*DrcdddgfSNr rr2r;srr<z.TestIndexErrors.test_mapping..qs!QAK.rc&dddgfdSrvr2rAsrr<z.TestIndexErrors.test_mapping..rs&&QAK*C*CrNr`ras @@r test_mappingzTestIndexErrors.test_mappingXs    HW  j----000 HV  j"5"5"5"5666j"@"@"@"@"@AAA HV  j"3"3"3"3444j">">">">">??? HUOOj":":":":":;;; HTNNj":":":":":;;; HV  j"9"9"9"9:::j"D"D"D"D"DEEE HV  j"8"8"8"8999j"C"C"C"C"CDDDDDrcjtjddttdfddS)Nrg)r rr r rzFtoo many indices for array: array is 2-dimensional, but 5 were indexedcSr1r2)r)indexsrr<z.{s %r)rr rr)rr)r{s @@rtest_mapping_error_messagez*TestIndexErrors.test_mapping_error_messagetsK HV  =      " " " " "rctjdttfdttfdtjdttfdttfddS)zcases from methods.c)r r c.dSNr,r&r;srr<z.TestIndexErrors.test_methods..!&&++rc0ddSNr,r r'r;srr<z.TestIndexErrors.test_methods..!))C*;*;r)rr c.dSrrr;srr<z.TestIndexErrors.test_methods..rrc0ddSrrr;srr<z.TestIndexErrors.test_methods..rrNr`r(s @r test_methodszTestIndexErrors.test_methods}s HV  j"5"5"5"5666j";";";";<<< HV  j"5"5"5"5666j";";";";<<<<rsu        ~=~=~=~=~=~=~=~=~=~=r