+
    nDjf3                     2   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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_sparse_format_conversionsz!test produces deprecation warning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markr0   nameparam)	sp_apiTEST_CLASSESclsmethod_namemethodr.   msgmarkersrJ   s	   &        W/data/cameron/venvs/s3viz/lib/python3.14/site-packages/scipy/sparse/tests/test_64bit.pycases_64bitrU   +   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^Xt 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)hasattrrZ   rD   r[   )rO   rP   instances   && rT   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   )selfrO   rP   kwr^   s   &&&, rT   _check_resiliencyRunAll64Bit._check_resiliencyZ   s(     
!	&2	&	/ 
'	/ 	c    r`   N)__name__
__module____qualname____firstlineno__rc   __static_attributes____classdictcell____classdict__s   @rT   rW   rW   X   s        re   rW   c            	         a  ] tR t^lt o ]P
                  P                  R]! ]! R4      4      4      R 4       t	]P
                  P                  R]! ]! R4      4      4      R 4       t
]P
                  P                  R]! ]! R4      4      4      R 4       t]P
                  P                  ^4      ]P
                  P                  R]! ]! R4      4      4      R 4       4       tRtV tR# )	Test64BitArraycls,method_namer%   c                ,    V P                  W^
R7       R# 
   maxval_limitNrc   ra   rO   rP   s   &&&rT   test_resiliency_limit_10'Test64BitArray.test_resiliency_limit_10o       sbAre   c                H    V P                  W\        P                  R 7       R# fixed_dtypeNrc   npint32rw   s   &&&rT   test_resiliency_all_32%Test64BitArray.test_resiliency_all_32s       sRXXFre   c                H    V P                  W\        P                  R 7       R# r|   rc   r   int64rw   s   &&&rT   test_resiliency_all_64%Test64BitArray.test_resiliency_all_64w   r   re   c                (    V P                  W4       R # Nrv   rw   s   &&&rT   test_resiliency_random%Test64BitArray.test_resiliency_random{   s     	s0re   r`   Nrf   rg   rh   ri   rI   rJ   parametrizelistrU   rx   r   r   	fail_slowr   rj   rk   rl   s   @rT   ro   ro   l   s      [[.[5K0LMB NB [[.[5K0LMG NG [[.[5K0LMG NG [[1[[.[5K0LM1 N 1re   ro   c            	          a  ] tR t^t o ]P
                  P                  ^4      ]P
                  P                  R]! ]	! R4      4      4      R 4       4       t
RtV tR# )Test64BitMatrixrp   r'   c                ,    V P                  WR R7       R# T)assert_32bitNrv   rw   s   &&&rT   
test_no_64Test64BitMatrix.test_no_64        	sdCre   r`   N)rf   rg   rh   ri   rI   rJ   r   r   r   rU   r   rj   rk   rl   s   @rT   r   r      sM     [[1[[.[5L0MND O Dre   r   c            	         a  ] tR t^t o ]P
                  P                  R]! ]! R4      4      4      R 4       t	]P
                  P                  R]! ]! R4      4      4      R 4       t
]P
                  P                  R]! ]! R4      4      4      R 4       t]P
                  P                  ^4      ]P
                  P                  R]! ]! R4      4      4      R 4       4       tRtV tR# )	Test64BitMatrixSameAsArrayrp   r'   c                ,    V P                  W^
R7       R# rr   rv   rw   s   &&&rT   rx   3Test64BitMatrixSameAsArray.test_resiliency_limit_10   rz   re   c                H    V P                  W\        P                  R 7       R# r|   r   rw   s   &&&rT   r   1Test64BitMatrixSameAsArray.test_resiliency_all_32   r   re   c                H    V P                  W\        P                  R 7       R# r|   r   rw   s   &&&rT   r   1Test64BitMatrixSameAsArray.test_resiliency_all_64   r   re   c                (    V P                  W4       R # r   rv   rw   s   &&&rT   r   1Test64BitMatrixSameAsArray.test_resiliency_random        	s0re   r`   Nr   rl   s   @rT   r   r      s      [[.[5L0MNB OB [[.[5L0MNG OG [[.[5L0MNG OG [[1[[.[5L0MN1 O 1re   r   c            	         a  ] tR t^t o ]P
                  P                  R]! ]! R4      4      4      R 4       t	]P
                  P                  R]! ]! R4      4      4      R 4       t
]P
                  P                  R]! ]! R4      4      4      R 4       t]P
                  P                  ^4      ]P
                  P                  R]! ]! R4      4      4      R 4       4       tRtV tR# )	Test64BitArrayExtrarp   r&   c                ,    V P                  W^
R7       R# rr   rv   rw   s   &&&rT   rx   ,Test64BitArrayExtra.test_resiliency_limit_10   rz   re   c                H    V P                  W\        P                  R 7       R# r|   r   rw   s   &&&rT   r   *Test64BitArrayExtra.test_resiliency_all_32   r   re   c                H    V P                  W\        P                  R 7       R# r|   r   rw   s   &&&rT   r   *Test64BitArrayExtra.test_resiliency_all_64   r   re   c                (    V P                  W4       R # r   rv   rw   s   &&&rT   r   *Test64BitArrayExtra.test_resiliency_random   r   re   r`   Nr   rl   s   @rT   r   r      s      [[.[5Q0RSB TB [[.[5Q0RSG TG [[.[5Q0RSG TG [[1[[.[5Q0RS1 T 1re   r   c            	       d  a  ] tR t^t o ]P
                  P                  ^4      ]P
                  P                  R]! ]	! R4      4      4      R 4       4       t
]P
                  P                  R]! ]	! R4      4      4      R 4       t]P
                  P                  R]! ]	! R4      4      4      R 4       t]P
                  P                  R]! ]	! R4      4      4      R 4       t]P
                  P                  ^4      ]P
                  P                  R]! ]	! R4      4      4      R 4       4       tRtV tR	# )
Test64BitMatrixExtrarp   r(   c                ,    V P                  WR R7       R# r   rv   rw   s   &&&rT   r   Test64BitMatrixExtra.test_no_64   r   re   c                ,    V P                  W^
R7       R# rr   rv   rw   s   &&&rT   rx   -Test64BitMatrixExtra.test_resiliency_limit_10   rz   re   c                H    V P                  W\        P                  R 7       R# r|   r   rw   s   &&&rT   r   +Test64BitMatrixExtra.test_resiliency_all_32   r   re   c                H    V P                  W\        P                  R 7       R# r|   r   rw   s   &&&rT   r   +Test64BitMatrixExtra.test_resiliency_all_64   r   re   c                (    V P                  W4       R # r   rv   rw   s   &&&rT   r   +Test64BitMatrixExtra.test_resiliency_random   r   re   r`   N)rf   rg   rh   ri   rI   rJ   r   r   r   rU   r   rx   r   r   r   rj   rk   rl   s   @rT   r   r      s5     [[1[[.[AQ5R0STD U D
 [[.[AQ5R0STB UB [[.[AQ5R0STG UG [[.[AQ5R0STG UG [[1[[.[AQ5R0ST1 U 1re   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offsetsrA   )ra   mr   s   &&&rT   _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Dre   c                h   a  \        ^
R7      V 3R l4       pS P                   F  pV! V4       K  	  R# )rs   rt   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# )rs   N)r   randomrandr   r   r   )mat_clsr   ra   s   & rT   r^   9Test64BitTools.test_decorator_maxval_limit.<locals>.check   so    		r1-.A,,Q9999		r1-.A,,Q9999re   Nr   MAT_CLASSESra   r^   r   s   f  rT   test_decorator_maxval_limit*Test64BitTools.test_decorator_maxval_limit   s5     
!b	1	: 
2	: ''G'N (re   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   ra   s   &    rT   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Kre   Nr   r   s   f  rT   test_decorator_maxval_random+Test64BitTools.test_decorator_maxval_random   s7     
!	-
	L 
.
	L ''G'N (re   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      )rI   raisesr   count_nonzerosumhas_canonical_formatsum_duplicatescsc_containercsr_containercoo_containeras   &&& rT   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.!*:*:;re   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   &&& rT   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"re   N)	r   r   r   r   r   r   r	   r
   r   )ra   r   r   s   &  rT   test_downcast_intp!Test64BitTools.test_downcast_intp  sq     
!RXXq	I	< 
J	< 
!RXX	6	 
7	 	iI6	9i8j*j9
J
;re   r`   N)rf   rg   rh   ri   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   rj   rk   rl   s   @rT   r   r      s>      	J
J
9iIK
	E&)< )<re   r   )9__doc__rI   numpyr   scipy.sparser   r   r   r   r   r   r   r	   r
   r   	test_baser   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   r@   r   rF   rU   rJ   thread_unsaferW   ro   r   r   r2   r   r   r   r`   re   rT   <module>r     sH   8        * 8;==#%L!>!>$&I$&C

*BZ "56    7 &1[ 1*Dk D1 1, 1+ 1 1. 1; 1 18 "IJ[< [< K[<re   