+
    yȇi\O              	          ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt	 ^ RI
Ht ]P                  ! RR.R7      R 4       t]P                  ! RR	.R7      R
 4       t ! R R4      t]P                   P#                  R] P$                  ] P&                  .4      R 4       tR tR t]P                   P#                  R]P.                  ]P0                  .4      ]P                   P#                  R]! . RO4      ]! . RO4      .4      R 4       4       t]P                   P#                  R]! . R O4      ]P4                  ! . R!O4      3]! . R O^R7      ]P4                  ! . R!O4      3.4      ]P                   P#                  R]P&                  ]P6                  .4      R 4       4       tR tR t]P                   P#                  R]]P4                  ].4      R 4       t ]P                   P#                  R. R!O. R"O3. R"O. R!O3.4      R 4       t!]P                   P#                  R. R#O4      ]P                   P#                  R]PD                  ^.4      R 4       4       t#R# )$    N)SparseDtype)SparseArrayintegerblock)paramsc                    V P                   # )z!kind kwarg to pass to SparseArrayparamrequests   &{/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/arrays/sparse/test_arithmetics.pykindr      s     ==    TFc                    V P                   # )zq
Fixture returning True or False, determining whether to operate
op(sparse, dense) instead of op(sparse, sparse)
r	   r   s   &r   mixr      s     ==r   c                     a  ] tR t^t o R tV 3R lR ltR tR tR t]	P                  P                  R. RO4      ]	P                  P                  R. RO4      R
 4       4       tR tR tR tR tR tR tR tR tR t]	P                  P                  RRR]P.                  .4      R 4       t]	P                  P                  RRR]P.                  .4      R 4       tR tR tR tRtV tR	# )TestSparseArrayArithmeticsc                2    \         P                  ! W4       R # N)tmassert_numpy_array_equal)selfabs   &&&r   _assert"TestSparseArrayArithmetics._assert   s    
##A)r   c                    < V ^8  d   QhRS[ /# )   r   )bool)format__classdict__s   "r   __annotate__'TestSparseArrayArithmetics.__annotate__    s     ' 'd 'r   c                8   \        V\        P                  4      '       d)   V! \        P                  ! V4      V4      P
                  pMN\        V\        P                  4      '       d)   V! V\        P                  ! V4      4      P
                  pM\        h\        P                  ! R R R7      ;_uu_ 4        V'       d   V! W4      P                  4       pMV! W4      P                  4       pRRR4       V P                  XV4       R#   + '       g   i     L$; i)ignore)invaliddivideN)

isinstancenpndarraypdSeriesvaluesNotImplementedErrorerrstateto_denser   )	r   r   r   a_denseb_denser   opexpectedresults	   &&&&&&&  r   _check_numeric_ops-TestSparseArrayArithmetics._check_numeric_ops    s     grzz**"))G,g6==H,,'299W#56==H%%[[(;;A002A**,	 < 	VX& <;s   76D		D	c                   \        V\        4      '       g   Q h\        VP                  \        4      '       g   Q hVP                  P                  \
        P                  8X  g   Q h\        VP                  \        4      '       g   Q hR # r   )	r(   r   dtyper   subtyper)   bool_
fill_valuer   )r   ress   &&r   _check_bool_result-TestSparseArrayArithmetics._check_bool_result2   s_    #{++++#))[1111yy  BHH,,,#..$////r   c                   \         P                  ! R R7      ;_uu_ 4        V P                  W8H  4       V P                  W8H  P	                  4       W48H  4       V P                  W8g  4       V P                  W8g  P	                  4       W48g  4       V P                  W8  4       V P                  W8  P	                  4       W48  4       V P                  W8*  4       V P                  W8*  P	                  4       W48*  4       V P                  W8  4       V P                  W8  P	                  4       W48  4       V P                  W8  4       V P                  W8  P	                  4       W48  4       V P                  W8H  4       V P                  W8H  P	                  4       W48H  4       V P                  W8g  4       V P                  W8g  P	                  4       W48g  4       V P                  W8  4       V P                  W8  P	                  4       W48  4       V P                  W8*  4       V P                  W8*  P	                  4       W48*  4       V P                  W8  4       V P                  W8  P	                  4       W48  4       V P                  W8  4       V P                  W8  P	                  4       W48  4       RRR4       R#   + '       g   i     R# ; i)r%   )r&   N)r)   r/   r>   r   r0   r   r   r   r1   r2   s   &&&&&r   _check_comparison_ops0TestSparseArrayArithmetics._check_comparison_ops8   s5   [[**
 ##AF+LL!&**,g.@A##AF+LL!&**,g.@A##AF+LL!&**,g.@A##AF+LL!&**,g.@A##AE*LL!%))+W->?##AE*LL!%))+W->? ##AL1LL!,002G4FG##AL1LL!,002G4FG##AL1LL!,002G4FG##AL1LL!,002G4FG##AK0LL!+//173DE##AK0LL!+//173DEQ +***s   JJ??K	c                   V P                  W,          4       V P                  W,          P                  4       W4,          4       V P                  W,          4       V P                  W,          P                  4       W4,          4       V P                  W,          4       V P                  W,          P                  4       W4,          4       V P                  W,          4       V P                  W,          P                  4       W4,          4       R # r   )r>   r   r0   rA   s   &&&&&r   _check_logical_ops-TestSparseArrayArithmetics._check_logical_opsc   s    &ae%%'):;&ae%%'):;,ak++-w/@A,ak++-w/@Ar   scalarr<   Nc                    Tp\         P                  ! \         P                  ^^^ \         P                  ^ ^^^\         P                  .
4      p\        WVR7      p	V P	                  WWW'4       R# )   r   r<   Nr)   arraynanr   r6   )
r   r   r   all_arithmetic_functionsr<   rG   r   r3   r-   r   s
   &&&&&&&   r   test_float_scalar,TestSparseArrayArithmetics.test_float_scalarq   sV    
 &2661aBFFAq!QGHjA63Cr   c                N   \         P                  ! \         P                  ^^^ \         P                  ^ ^^^\         P                  .
4      p\        W!R7      pV P	                  V^V^4       V P	                  V^ V^ 4       V P	                  V^V^4       \        W!^ R7      pV P	                  V^V^4       V P	                  V^ V^ 4       V P	                  V^V^4       \        W!^R7      pV P	                  V^V^4       V P	                  V^ V^ 4       V P	                  V^V^4       R# rI   r   rJ   Nr)   rL   rM   r   rB   )r   r   r-   r   s   &&  r   test_float_scalar_comparison7TestSparseArrayArithmetics.test_float_scalar_comparison{   s   2661aBFFAq!QGH*""1a3""1a3""1a3a8""1a3""1a3""1a3a8""1a3""1a3""1a3r   c                    Tp\         P                  ! . RO4      p\         P                  ! . RO4      p\        WQ^ R7      p\        Wa^ R7      pV P                  WxWVW$4       R# )        rJ   N
rX         ?       @g      @rX   rX   rZ   r[   rZ   rX   
rX   r[         @g      @rX   rX   rZ   r]   r[   rX   )r)   rL   r   r6   	r   r   r   rN   r3   r-   rvaluesr   r   s	   &&&&     r   "test_float_same_index_without_nans=TestSparseArrayArithmetics.test_float_same_index_without_nans   sO    %LM((MNa8q9fs?r   c                   Tp\         P                  ! \         P                  ^^^ \         P                  ^ ^^^\         P                  .
4      p\         P                  ! \         P                  ^^^\         P                  ^ ^^^\         P                  .
4      p\        WaR7      p\        WqR7      p	V P	                  WWgW%4       R# )rI   rS   NrK   )
r   r   r   rN   r   r3   r-   r_   r   r   s
   &&&&&     r   test_float_same_index_with_nans:TestSparseArrayArithmetics.test_float_same_index_with_nans   s     &2661aBFFAq!QGH((BFFAq!RVVQ1aHI*+fs?r   c                :   \         P                  ! \         P                  ^^^ \         P                  ^ ^^^\         P                  .
4      p\         P                  ! \         P                  ^^^\         P                  ^ ^^^\         P                  .
4      p\        W!R7      p\        W1R7      pV P	                  WEW#4       \         P                  ! . RO4      p\         P                  ! . RO4      p\        W!^ R7      p\        W1^ R7      pV P	                  WEW#4       R# )rI   rS   rJ   NrY   r\   rT   r   r   r-   r_   r   r   s   &&    r    test_float_same_index_comparison;TestSparseArrayArithmetics.test_float_same_index_comparison   s    2661aBFFAq!QGH((BFFAq!RVVQ1aHI*+""19LM((MNa8q9""19r   c                   Tp\         P                  ! \         P                  ^^^ \         P                  ^ ^^^\         P                  .
4      p\         P                  ! ^\         P                  ^^\         P                  ^ ^^^\         P                  .
4      p\        WQR7      p\        WaR7      pV P	                  WxWVW$4       V P	                  Wx^ ,          WV^ ,          W$4       \        WQ^ R7      p\        WaR7      pV P	                  WxWVW$4       \        WQ^ R7      p\        Wa^ R7      pV P	                  WxWVW$4       \        WQ^R7      p\        Wa^R7      pV P	                  WxWVW$4       R# rR   rK   r^   s	   &&&&     r   test_float_array+TestSparseArrayArithmetics.test_float_array   s!   %2661aBFFAq!QGH((Arvvq!RVVQ1aHI*+fs?q5&A+sGa8+fs?a8q9fs?a8q9fs?r   c                   Tp\         P                  ! \         P                  ^^^ \         P                  ^ ^^^\         P                  .
4      p\         P                  ! ^\         P                  ^^\         P                  ^ ^^^\         P                  .
4      p\        VRR7      p\        VRR7      pV P	                  WgWEW4       V P	                  Wg^ ,          WE^ ,          W4       \        VR^ R7      p\        VRR7      pV P	                  WgWEW4       \        VR^ R7      p\        VR^ R7      pV P	                  WgWEW4       \        VR^R7      p\        VR^R7      pV P	                  WgWEW4       R# )rI   r   rS   r   rJ   NrK   )r   r   rN   r3   r-   r_   r   r   s   &&&     r   test_float_array_different_kind:TestSparseArrayArithmetics.test_float_array_different_kind   s1   %2661aBFFAq!QGH((Arvvq!RVVQ1aHIY/g.fs?q5&A+sGY1=g.fs?Y1=g!<fs?Y1=g!<fs?r   c                   \         P                  ! \         P                  ^^^ \         P                  ^ ^^^\         P                  .
4      p\         P                  ! ^\         P                  ^^\         P                  ^ ^^^\         P                  .
4      p\        W!R7      p\        W1R7      pV P	                  WEW#4       V P	                  WE^ ,          W#^ ,          4       \        W!^ R7      p\        W1R7      pV P	                  WEW#4       \        W!^ R7      p\        W1^ R7      pV P	                  WEW#4       \        W!^R7      p\        W1^R7      pV P	                  WEW#4       R# rR   rT   rf   s   &&    r   test_float_array_comparison6TestSparseArrayArithmetics.test_float_array_comparison   s   2661aBFFAq!QGH((Arvvq!RVVQ1aHI*+""19""1!eVq[Aa8+""19a8q9""19a8q9""19r   c                   Tp\         P                  p\         P                  ! . ROVR7      p\         P                  ! . ROVR7      p\        WeVR7      pVP                  \        V4      8X  g   Q h\        WuVR7      p	V	P                  \        V4      8X  g   Q hV P                  WWgW$4       V P                  W^ ,          Wg^ ,          W$4       \        V^ WQR7      pVP                  \        V4      8X  g   Q h\        WuVR7      p	V	P                  \        V4      8X  g   Q hV P                  WWgW$4       \        V^ WQR7      pVP                  \        V4      8X  g   Q h\        V^ WQR7      p	V	P                  \        V4      8X  g   Q hV P                  WWgW$4       \        V^WQR7      pVP                  \        V^R7      8X  g   Q h\        V^WQR7      p	V	P                  \        V^R7      8X  g   Q hV P                  WWgW$4       R# )r   r9   r9   r   )r<   r9   r   r<   N
r   rI   r   r   r   r   rI   r   rI   r   
r   r   r      r   r   rI      r   r   )r)   int64rL   r   r9   r   r6   )
r   r   r   rN   r3   r9   r-   r_   r   r   s
   &&&&      r   test_int_array)TestSparseArrayArithmetics.test_int_array   s   % 8F((9G$7ww+e,,,,48ww+e,,,,fs?q5&A+sG1EEww+e,,,,48ww+e,,,,fs?1EEww+e,,,,AUFww+e,,,,fs?1EEww+e::::AUFww+e::::fs?r   c                   R p\         P                  ! . ROVR7      p\         P                  ! . ROVR7      p\        W2VR7      p\        WBVR7      pV P                  WVW44       V P                  WV^ ,          W4^ ,          4       \        W2V^ R7      p\        WBVR7      pV P                  WVW44       \        W2V^ R7      p\        WBV^ R7      pV P                  WVW44       \        W2V^R7      p\        WBV^R7      pV P                  WVW44       R# )rz   rs   rt   )r9   r   r<   Nrv   rw   )r)   rL   r   rB   )r   r   r9   r-   r_   r   r   s   &&     r   test_int_array_comparison4TestSparseArrayArithmetics.test_int_array_comparison  s     8F((9G$748""19""1!eVq[A$1E48""19$1E4AF""19$1E4AF""19r   TFc                :   \         P                  ! . RO\         P                  R7      p\         P                  ! . RO\         P                  R7      p\        W1\         P                  VR7      p\        WA\         P                  VR7      pV P	                  WVW44       R# )Trs   r   r9   r<   N)TFTTr)   rL   r;   r   rE   r   r   r<   r-   r_   r   r   s   &&&    r   test_bool_same_index/TestSparseArrayArithmetics.test_bool_same_index3  sb     3288D((4BHHEjQ"((zRf6r   c                :   \         P                  ! . RO\         P                  R7      p\         P                  ! . RO\         P                  R7      p\        W1\         P                  VR7      p\        WA\         P                  VR7      pV P	                  WVW44       R# )Trs   r   N)TFTFTT)TFFTFTr   r   s   &&&    r   test_bool_array_logical2TestSparseArrayArithmetics.test_bool_array_logical>  sb     @Q((B"((SjQ"((zRf6r   c                ^   TpR p\         P                  ! \         P                  ^^^ \         P                  ^ ^^^\         P                  .
4      p\         P                  ! . ROVR7      p\        WqR7      p	\        WR7      p
V
P                  \        V4      8X  g   Q hV P                  WWxW%4       V P                  W^ ,          Wx^ ,          W%4       \        Wq^ R7      p	\        WR7      p
V
P                  \        V4      8X  g   Q hV P                  WWxW%4       \        Wq^ R7      p	\        W^ R7      p
V
P                  \        V4      8X  g   Q hV P                  WWxW%4       \        Wq^R7      p	\        W^R7      p
V
P                  \        V^R7      8X  g   Q hV P                  WWxW%4       R# rz   rs   rS   rJ   ru   Nrw   )r)   rL   rM   r   r9   r   r6   )r   r   r   rN   r   r3   rdtyper-   r_   r   r   s   &&&&&      r   test_mixed_array_float_int5TestSparseArrayArithmetics.test_mixed_array_float_intI  sf   %2661aBFFAq!QGH((9H*+ww+f----fs?q5&A+sGa8+ww+f----fs?a8q9ww+f----fs?a8q9ww+f;;;;fs?r   c                P   R p\         P                  ! \         P                  ^^^ \         P                  ^ ^^^\         P                  .
4      p\         P                  ! . ROVR7      p\        W1R7      p\        WAR7      pVP                  \        V4      8X  g   Q hV P                  WVW44       V P                  WV^ ,          W4^ ,          4       \        W1^ R7      p\        WAR7      pVP                  \        V4      8X  g   Q hV P                  WVW44       \        W1^ R7      p\        WA^ R7      pVP                  \        V4      8X  g   Q hV P                  WVW44       \        W1^R7      p\        WA^R7      pVP                  \        V^R7      8X  g   Q hV P                  WVW44       R# r   )r)   rL   rM   r   r9   r   rB   )r   r   r   r-   r_   r   r   s   &&     r   test_mixed_array_comparison6TestSparseArrayArithmetics.test_mixed_array_comparisone  sY    2661aBFFAq!QGH((9H*+ww+f----""19""1!eVq[Aa8+ww+f----""19a8q9ww+f----""19a8q9ww+f;;;;""19r   c                ,   \        . RO4      p\        . RO4      pW,          p\        P                  P                  P                  P                  ^\        P                  ! . RORR7      4      p\        . ROVR7      p\        P                  ! W54       R# )	Tint32rs   )sparse_indexN)TTFF)TFTFr   rI   r   )FTT)
r   r+   corearrayssparseIntIndexr)   rL   r   assert_sp_array_equal)r   str5   sp_indexr4   s   &     r   test_xor#TestSparseArrayArithmetics.test_xor  se    232377>>((11!RXXiw5WX2J
  2r    )r   rI   rx   )Nr   r   )__name__
__module____qualname____firstlineno__r   r6   r>   rB   rE   pytestmarkparametrizerO   rU   r`   rc   rg   rj   rm   rp   r{   r~   r)   rM   r   r   r   r   r   __static_attributes____classdictcell__)r!   s   @r   r   r      s    *' '$0)FVB [[Xy1[[\<8D 9 2D4$	@
@: @.@.:*"@H:0 [[\D%+@A7 B7 [[\D%+@A7 B7@8::3 3r   r   r3   c                     \        ^ ^.^ R7      pV ! V^ ^.4      pV ! V\        ^ ^.4      4      p\        P                  ! W#4       R# r   ru   N)r   r   r   )r3   arrr5   r4   s   &   r   test_with_listr     sD    
q!f
+CaV_F#{Aq6*+HV.r   c                      \        ^ ^.^ R7      p \        P                  ! ^^.^^..4      pV P                  V4      pV\        J g   Q hR# r   )r   r+   	DataFrame__add__NotImplemented)r   dfr5   s      r   test_with_dataframer     sH    
q!f
+C	1v1v&	'B[[_F^###r   c                      \        ^ ^.^ R7      p V \        P                  ! ^4      ,          pV ^,          p\        P                  ! W4       R# r   r   r)   rL   r   r   )r   r5   r4   s      r   test_with_zerodim_ndarrayr     s;    
q!f
+C288A;FQwHV.r   ufuncr   c                     V ! V4      pV ! VP                   4      p\        V ! \        P                  ! V4      4      VR 7      p\        P
                  ! W$4       R# )ru   N)r<   r   r)   asarrayr   r   )r   r   r5   r<   r4   s   &&   r   test_ufuncsr     sB    
 3ZFs~~&J5C1jIHV.r   za, bru   c                     V ! W4      pV ! \         P                  ! V4      \         P                  ! V4      4      p\        V\        4      '       g   Q h\        P
                  ! \         P                  ! V4      V4       R # r   )r)   r   r(   r   r   r   )r   r   r   r5   r4   s   &&&  r   test_binary_ufuncsr     sU     1[FRZZ]BJJqM2Hfk****

6 2H=r   c                      \        . RO4      p \        P                  ! . RO4      pW,          p\        P                  ! . RO4      p\        P                  ! W4       R# )r   Nr   r   r   r   r   rI   r   rx   r   rx   r   rx   )r   r)   rL   r   r   sparrayr*   r4   s      r   test_ndarray_inplacer     s>    ,'Ghh|$GGxx%H2r   c                      \        . RO4      p \        P                  ! . RO4      pW,          p \        . RO^ R7      p\        P                  ! W4       R# )r   ru   Nr   r   r   r   r   s      r   test_sparray_inplacer     s<    ,'Ghh|$GG<A6HW/r   consc                     \        R R .4      pV ! . RO4      p\        P                  ! \        RR7      ;_uu_ 4        W,           RRR4       R#   + '       g   i     R# ; i)Tzoperands have mismatched lengthmatchN)TTT)r   r   raises
ValueError)r   leftrights   &  r   test_mismatched_length_cmp_opr     sB    d|$D#$E	z)J	K	K 
L	K	K	Ks   	AA 	c           	         Tp\         P                  ! \        R \        V 4       R\        V4       2R7      ;_uu_ 4        V! \	        V ^ R7      \
        P                  ! V4      4       RRR4       R#   + '       g   i     R# ; i)zlength mismatch: z vs. r   ru   N)r   r   AssertionErrorlenr   r)   rL   )r   r   rN   r3   s   &&& r   test_mismatched_length_arith_opr     sZ     
"B	~/@QcRSfX-V	W	W
;qQ'!5 
X	W	W	Ws   )A22B	r<   c           	         \        \        V 4      p \        P                  P	                  ^4      P                  ^4      p\        P                  P	                  ^4      P                  ^4      pWR&   WR&   \        W!R7      p\        W1R7      p\        P                  ! RR7      ;_uu_ 4        V ! WE4      p\        V ! VP                  4       VP                  4       4      VP                  R7      p\        V\        4      '       g   Q h\        P                  ! VP                  4       VP                  4       4       V ! WEP                  4       4      p\        V\        4      '       g   Q h\        P                  ! Wh4       V ! VP                  4       V4      p	\        V	\        4      '       g   Q h\        P                  ! Wi4       V ! V^4      p
\        V
\        4      '       g   Q h V ! VP                  4       ^4      pV ! VP                  ^4      p\        P                  ! V
P                  V4       \        P                  ! V
P                  4       V4       RRR4       R#   \         d     Li ; i  + '       g   i     R# ; i)r   :NNr   :NNrx   ru   r%   )allN)getattroperatorr)   randomdefault_rngstandard_normalr   r/   r0   r<   r(   r   assert_almost_equalr   r   )r3   r<   data1data2firstsecondr=   expres2res3res4exp_fvs   &&          r   test_binary_operatorsr     s    
2	BII!!!$44R8EII!!!$44R8E#J#J5E6F		"	"u~~!23@P@P
 #{++++
s||~s||~>%*+$,,,,
  +%.."F+$,,,,
  +%|$,,,,	9U^^%q)C((!,F ""4??F;""4==?C87 
#	".  		/ 
#	"	"s2   ,D8I0%*IAI0I-*I0,I--I00J	)r   r   rI   )NNr   rI   )r   r   r   r   r   )addsubmultruedivfloordivpow)$r   numpyr)   r   pandasr+   r   pandas._testing_testingr   pandas.core.arrays.sparser   fixturer   r   r   r   r   eqr   r   r   r   absr   r   rL   greaterr   r   r   listr   r   rM   r   r   r   r   <module>r      sC         1 	7+, -
 e}% &m3 m3` X\\:;/ </$/ 266266"23	K&4G(HI/ 4/ 
	Y	)!45	Y1	-rxx	/BC 2662::"67> 8>30 $+!>? @ 
	L!	y!66 RS{3&9 4 T&9r   