+
    0i2                     .   R t ^ RIt^ RIt^ RIHtHtHtHtH	t	H
t
HtHtHtHt ^RIHtHtHtHtHtHtHtHtH t!H"t#H$t%H&t'H(t)H*t+H,t, RRRRRRR	R
RRRRRRRR/t-R t.]P^                  Pa                  RR7       ! R R4      4       t1 ! R R]14      t2 ! R R]14      t3 ! R R]14      t4]P^                  Pj                   ! R R]14      4       t6]P^                  Pj                   ! R R ]14      4       t7]P^                  Pa                  R!R7       ! R" R#4      4       t8R# )$z1Test functions involving 64bit or 32bit indexing N)
	bsr_array	coo_array	csc_array	csr_array	dia_array
bsr_matrix
coo_matrix
csc_matrix
csr_matrix
dia_matrix)TestBSRTestCOOTestCSCTestCSRTestDIATestDOKTestLILTestBSRMatrixTestCOOMatrixTestCSCMatrixTestCSRMatrixTestDIAMatrixTestDOKMatrixTestLILMatrixwith_64bit_maxval_limit	test_expmz%expm for 64-bit indices not availabletest_invz)linsolve for 64-bit indices not available
test_solvetest_scalar_idx_dtypeztest implemented in base classtest_large_dimensions_reshapez%test actually requires 64-bit to worktest_constructor_smallcolztest verifies int32 indexestest_constructor_largecolztest verifies int64 indexestest_tocoo_tocsr_tocsc_gh19245c              #    "   V R8X  d   \         \        \        \        \        .pM[V R8X  d   \
        \        .pMGV R8X  d   \        \        \        \        \        .pM$V R8X  d   \        \        .pM\        RV : R24      hV F  p\        \!        V4      4       F  p\#        W#4      pVP%                  R4      '       g   K'  \#        VRR	4      '       d   K<  . p\&        P)                  V4      pV'       d0   VP+                  \,        P.                  P1                  VR
7      4       \#        VR. 4      pV F'  pVP2                  R9   g   K  VP+                  V4       K)  	  \,        P4                  ! W#VR7      x  K  	  K  	  R# 5i)al  Yield all tests for all formats

This is more than testing get_index_dtype. It allows checking whether upcasting
or downcasting the index dtypes affects test results. The approach used here
does not try to figure out which tests might fail due to 32/64-bit issues.
We just run them all.
So, each test method in that uses cases_64bit reruns most of the test suite!
sparraysparray-extraspmatrixspmatrix-extrazparameter sp_api=z is not validtest_slowFreason
pytestmark)marksN)skipifskipxfailxslow)_TestBSR_TestCOO_TestCSC_TestCSR_TestDIA_TestDOK_TestLIL_TestBSRMatrix_TestCOOMatrix_TestCSCMatrix_TestCSRMatrix_TestDIAMatrix_TestDOKMatrix_TestLILMatrix
ValueErrorsorteddirgetattr
startswith
SKIP_TESTSgetappendpytestmarkr/   nameparam)	sp_apiTEST_CLASSESclsmethod_namemethodr-   msgmarkersrI   s	   &        [/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/sparse/tests/test_64bit.pycases_64bitrT   *   s5      (HhI	?	"
 !(+	:	&&8	#	#&7-fYm<==!#c(+KS.F&&w//66 nn[1LL!1!1!1!=>!&,;#Dyy$HHT* $ ll35AA , s   B:FFF5AF	9Fzfails in parallelr*   c                   &   a  ] tR t^Wt o R tRtV tR# )RunAll64Bitc                8    \        R/ VB R  4       pV! W4       R# )c                    V ! 4       p\        VR 4      '       d   VP                  4         \        W!4      ! 4        \        VR4      '       d   VP                  4        R# R#   \        TR4      '       d   TP                  4        i i ; i)setup_methodteardown_methodN)hasattrrY   rC   rZ   )rN   rO   instances   && rS   check,RunAll64Bit._check_resiliency.<locals>.check]   sq    uHx00%%'/.08%677,,. 878%677,,. 8s   A! !%BN )r   )selfrN   rO   kwr]   s   &&&, rS   _check_resiliencyRunAll64Bit._check_resiliencyY   s(     
!	&2	&	/ 
'	/ 	c    r_   N)__name__
__module____qualname____firstlineno__rb   __static_attributes____classdictcell____classdict__s   @rS   rV   rV   W   s        rd   rV   c                     a  ] tR t^kt o ]P
                  P                  R]! R4      4      R 4       t]P
                  P                  R]! R4      4      R 4       t	]P
                  P                  R]! R4      4      R 4       t
]P
                  P                  ^4      ]P
                  P                  R]! R4      4      R 4       4       tRtV tR# )	Test64BitArraycls,method_namer$   c                ,    V P                  W^
R7       R# 
   maxval_limitNrb   r`   rN   rO   s   &&&rS   test_resiliency_limit_10'Test64BitArray.test_resiliency_limit_10n       sbArd   c                H    V P                  W\        P                  R 7       R# fixed_dtypeNrb   npint32rv   s   &&&rS   test_resiliency_all_32%Test64BitArray.test_resiliency_all_32r       sRXXFrd   c                H    V P                  W\        P                  R 7       R# r{   rb   r   int64rv   s   &&&rS   test_resiliency_all_64%Test64BitArray.test_resiliency_all_64v   r   rd   c                (    V P                  W4       R # Nru   rv   s   &&&rS   test_resiliency_random%Test64BitArray.test_resiliency_randomz   s     	s0rd   r_   Nre   rf   rg   rh   rH   rI   parametrizerT   rw   r   r   	fail_slowr   ri   rj   rk   s   @rS   rn   rn   k   s      [[.I0FGB HB [[.I0FGG HG [[.I0FGG HG [[1[[.I0FG1 H 1rd   rn   c                      a  ] tR t^t o ]P
                  P                  ^4      ]P
                  P                  R]! R4      4      R 4       4       t	Rt
V tR# )Test64BitMatrixro   r&   c                ,    V P                  WR R7       R# T)assert_32bitNru   rv   s   &&&rS   
test_no_64Test64BitMatrix.test_no_64        	sdCrd   r_   N)re   rf   rg   rh   rH   rI   r   r   rT   r   ri   rj   rk   s   @rS   r   r      sH     [[1[[.J0GHD I Drd   r   c                     a  ] tR t^t o ]P
                  P                  R]! R4      4      R 4       t]P
                  P                  R]! R4      4      R 4       t	]P
                  P                  R]! R4      4      R 4       t
]P
                  P                  ^4      ]P
                  P                  R]! R4      4      R 4       4       tRtV tR# )	Test64BitMatrixSameAsArrayro   r&   c                ,    V P                  W^
R7       R# rq   ru   rv   s   &&&rS   rw   3Test64BitMatrixSameAsArray.test_resiliency_limit_10   ry   rd   c                H    V P                  W\        P                  R 7       R# r{   r~   rv   s   &&&rS   r   1Test64BitMatrixSameAsArray.test_resiliency_all_32   r   rd   c                H    V P                  W\        P                  R 7       R# r{   r   rv   s   &&&rS   r   1Test64BitMatrixSameAsArray.test_resiliency_all_64   r   rd   c                (    V P                  W4       R # r   ru   rv   s   &&&rS   r   1Test64BitMatrixSameAsArray.test_resiliency_random        	s0rd   r_   Nr   rk   s   @rS   r   r      s      [[.J0GHB IB [[.J0GHG IG [[.J0GHG IG [[1[[.J0GH1 I 1rd   r   c                     a  ] tR t^t o ]P
                  P                  R]! R4      4      R 4       t]P
                  P                  R]! R4      4      R 4       t	]P
                  P                  R]! R4      4      R 4       t
]P
                  P                  ^4      ]P
                  P                  R]! R4      4      R 4       4       tRtV tR# )	Test64BitArrayExtraro   r%   c                ,    V P                  W^
R7       R# rq   ru   rv   s   &&&rS   rw   ,Test64BitArrayExtra.test_resiliency_limit_10   ry   rd   c                H    V P                  W\        P                  R 7       R# r{   r~   rv   s   &&&rS   r   *Test64BitArrayExtra.test_resiliency_all_32   r   rd   c                H    V P                  W\        P                  R 7       R# r{   r   rv   s   &&&rS   r   *Test64BitArrayExtra.test_resiliency_all_64   r   rd   c                (    V P                  W4       R # r   ru   rv   s   &&&rS   r   *Test64BitArrayExtra.test_resiliency_random   r   rd   r_   Nr   rk   s   @rS   r   r      s      [[.O0LMB NB [[.O0LMG NG [[.O0LMG NG [[1[[.O0LM1 N 1rd   r   c                   (  a  ] tR t^t o ]P
                  P                  ^4      ]P
                  P                  R]! R4      4      R 4       4       t	]P
                  P                  R]! R4      4      R 4       t
]P
                  P                  R]! R4      4      R 4       t]P
                  P                  R]! R4      4      R 4       t]P
                  P                  ^4      ]P
                  P                  R]! R4      4      R 4       4       tRtV tR	# )
Test64BitMatrixExtraro   r'   c                ,    V P                  WR R7       R# r   ru   rv   s   &&&rS   r   Test64BitMatrixExtra.test_no_64   r   rd   c                ,    V P                  W^
R7       R# rq   ru   rv   s   &&&rS   rw   -Test64BitMatrixExtra.test_resiliency_limit_10   ry   rd   c                H    V P                  W\        P                  R 7       R# r{   r~   rv   s   &&&rS   r   +Test64BitMatrixExtra.test_resiliency_all_32   r   rd   c                H    V P                  W\        P                  R 7       R# r{   r   rv   s   &&&rS   r   +Test64BitMatrixExtra.test_resiliency_all_64   r   rd   c                (    V P                  W4       R # r   ru   rv   s   &&&rS   r   +Test64BitMatrixExtra.test_resiliency_random   r   rd   r_   N)re   rf   rg   rh   rH   rI   r   r   rT   r   rw   r   r   r   ri   rj   rk   s   @rS   r   r      s     [[1[[.<L0MND O D
 [[.<L0MNB OB [[.<L0MNG OG [[.<L0MNG OG [[1[[.<L0MN1 O 1rd   r   z%Fails in parallel for unknown reasonsc            
       P   a  ] tR t^t o ]]]]]]	]
]]].
tR tR tR tR tRtV tR# )Test64BitToolsc                   \         P                  ! V4      pVP                  R9   d;   VP                  P                  V8H  ;'       d    VP                  P                  V8H  # VP                  R8X  d;   VP
                  P                  V8H  ;'       d    VP                  P                  V8H  # VP                  R8X  d   VP                  P                  V8H  # \        RV: R24      h)csccoodiazmatrix z has no integer indices)r   csrbsr)	r   dtypeformatindicesindptrrowcoloffsetsr@   )r`   mr   s   &&&rS   _compare_index_dtype#Test64BitTools._compare_index_dtype   s    88,,IIOOu,KK188>>U3JKXXEEKK5(DDquu{{e/CDXXIIOOu,-wqe+BCDDrd   c                h   a  \        ^
R7      V 3R l4       pS P                   F  pV! V4       K  	  R# )rr   rs   c                 @  < V ! \         P                  P                  ^
^4      4      pSP                  V\         P                  4      '       g   Q hV ! \         P                  P                  ^^4      4      pSP                  V\         P
                  4      '       g   Q hR# )rr   N)r   randomrandr   r   r   )mat_clsr   r`   s   & rS   r]   9Test64BitTools.test_decorator_maxval_limit.<locals>.check   so    		r1-.A,,Q9999		r1-.A,,Q9999rd   Nr   MAT_CLASSESr`   r]   r   s   f  rS   test_decorator_maxval_limit*Test64BitTools.test_decorator_maxval_limit   s5     
!b	1	: 
2	: ''G'N (rd   c                h   a  \        R R7      V 3R l4       pS P                   F  pV! V4       K  	  R# )T)r   c                 d  < R pR p\        ^d4       F  pV ! \        P                  P                  ^	^	4      4      pT;'       g!    SP	                  V\        P
                  4      pT;'       g!    SP	                  V\        P                  4      pV'       g   K  V'       g   K   R# 	  \        R4      h)Fz#both 32 and 64 bit indices not seenN)ranger   r   r   r   r   r   AssertionError)r   seen_32seen_64kr   r`   s   &    rS   r]   :Test64BitTools.test_decorator_maxval_random.<locals>.check   s    GG3ZBIINN1a01!KKT%>%>q"((%K!KKT%>%>q"((%K7ww   %%JKKrd   Nr   r   s   f  rS   test_decorator_maxval_random+Test64BitTools.test_decorator_maxval_random   s7     
!	-
	L 
.
	L ''G'N (rd   c                8   \        \        P                  ^R7      R 4       p\        \        P                  R7      R 4       pV! \        \        \
        4       V! \        \        \
        4       V! \        \        \        4       V! \        \        \        4       R# )   )r}   downcast_maxvalc                 >   V ! ^^.^^.^^..4      p\         P                  ! \        VP                  ^R7       \         P                  ! \        VP                  ^ R7       V! . RO. RO.4      p\         P                  ! \        VP                  ^ R7       \         P                  ! \        VP                  ^R7       V! . RO. RO.4      p\         P                  ! \        VP                  ^ R7       RVn        \         P                  ! \        VP                  4       R# r   )axisFN)r         )r         )r   r      )rH   raisesr   count_nonzerosumhas_canonical_formatsum_duplicatescsc_containercsr_containercoo_containeras   &&& rS   check_limited8Test64BitTools.test_downcast_intp.<locals>.check_limited  s     1v1v1v67AMM.!//BMM.!%%a8y)45AMM.!//BMM.!%%a8y)45AMM.!//B%*A"MM.!*:*:;rd   r|   c                 B   V ! ^^.^^.^^..4      pVP                  ^R7       VP                  ^ R7       V! . RO. RO.4      pVP                  ^ R7       VP                  ^R7       V! . RO. RO.4      pVP                  ^ R7       RVn        VP                  4        R# r   )r   r   r   r   r   s   &&& rS   check_unlimited:Test64BitTools.test_downcast_intp.<locals>.check_unlimited  s     1v1v1v67AOOO#EEqEMy)45AOOO#EEqEMy)45AOOO#%*A"rd   N)	r   r   r   r   r   r   r	   r
   r   )r`   r   r   s   &  rS   test_downcast_intp!Test64BitTools.test_downcast_intp  sq     
!RXXq	I	< 
J	< 
!RXX	6	 
7	 	iI6	9i8j*j9
J
;rd   r_   N)re   rf   rg   rh   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   ri   rj   rk   s   @rS   r   r      s>      	J
J
9iIK
	E&)< )<rd   r   )9__doc__rH   numpyr   scipy.sparser   r   r   r   r   r   r   r	   r
   r   	test_baser   r2   r   r3   r   r4   r   r5   r   r6   r   r7   r   r8   r   r9   r   r:   r   r;   r   r<   r   r=   r   r>   r   r?   r   rE   rT   rI   thread_unsaferV   rn   r   r   r1   r   r   r   r_   rd   rS   <module>r     sB   8        * 8;==#%L!>!>$&C	
*BZ "56    7 &1[ 1*Dk D1 1, 1+ 1 1. 1; 1 18 "IJ[< [< K[<rd   