+
    yȇiM)                     f    ^ RI t^ RIt^ RIHt ^ RIt^ RIHtHt ^ RI	H
t ^ RIHt  ! R R4      tR# )    N)IntIndex)SparseDtypeisna)SparseArrayc            	         a  ] tR t^t o R tR tR tR tR tR t	]
P                  P                  R]! ]^ 4      ].4      R 4       tR	 tR
 t]
P                  P                  RR]! ^^ .4      .4      R 4       tR t]
P                  P                  R]P,                  ! ^^.4      ^ 3]P,                  ! RR.4      ]P.                  3RR.R3]P2                  ! R4      .]P4                  3.4      R 4       t]
P                  P                  R. R"O4      ]
P                  P                  R^ ^
.4      R 4       4       t]
P                  P                  R. R"O4      R 4       tR tR tR t R t!R t"R t#R  t$R!t%V t&R# )#TestConstructorsc                   \        \        P                  ^^\        P                  .4      pVP                  \	        \        P
                  \        P                  4      8X  g   Q hVP                  P                  \        P
                  8X  g   Q h\        P                  ! VP                  4      '       g   Q h\        \        P                  ^^\        P                  .^ R7      pVP                  \	        \        P
                  ^ 4      8X  g   Q hVP                  ^ 8X  g   Q h\        . RO\        P
                  R7      pVP                  \	        \        P
                  \        P                  4      8X  g   Q h\        P                  ! VP                  4      '       g   Q h\        . RO\        P                  R7      pVP                  \	        \        P                  ^ 4      8X  g   Q hVP                  ^ 8X  g   Q h\        . RO^ \        P                  R7      pVP                  \	        \        P                  ^ 4      8X  g   Q hVP                  ^ 8X  g   Q h\        . RORR7      pVP                  \	        \        P                  ^ 4      8X  g   Q hVP                  ^ 8X  g   Q h\        . RO^ RR7      pVP                  \	        \        P                  ^ 4      8X  g   Q hVP                  ^ 8X  g   Q hR# )   
fill_valuedtyper   r   N)r   r
         )
r   npnanr   r   float64subtypeisnanr   int64selfarrs   & |/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/arrays/sparse/test_constructors.pytest_constructor_dtype'TestConstructors.test_constructor_dtype   s   2661a01yyK

BFF;;;;yy  BJJ...xx''''2661a0Q?yyK

A6666~~""",bjj9yyK

BFF;;;;xx'''',bhh7yyK!4444~~""",1BHHEyyK!4444~~""",d3yyK!4444~~""",1DAyyK!4444~~"""    c                v    \        . RORR7      p\        . RO\        R7      p\        P                  ! W4       R# )r
   intr   Nr
   r      )r   r    tmassert_sp_array_equalr   resultexpecteds   &  r   test_constructor_dtype_str+TestConstructors.test_constructor_dtype_str.   s(    Ye4y4
  2r   c                   \        . RO\        RR4      R7      p\        . ROR\        P                  R7      p\        P
                  ! W4       VP                  P                  \        P                  ! R4      8X  g   Q hR# )r
   r   r   r   Nr
   r   r   r
   )r   r   r   r   r#   r$   	sp_valuesr   r%   s   &  r   test_constructor_sparse_dtype.TestConstructors.test_constructor_sparse_dtype3   sX    \Wb1IJ|"((K
  2%%')::::r   c                    \        . RORR7      p\        . RO\        P                  R7      p\        P                  ! W4       VP
                  P                  \        P                  ! R4      8X  g   Q hR# )r
   zSparse[int32]r   int32Nr+   )r   r   r1   r#   r$   r-   r   r%   s   &  r   !test_constructor_sparse_dtype_str2TestConstructors.test_constructor_sparse_dtype_str9   sO    \A|288<
  2%%')::::r   c                   \        R R \        P                  R.\        R7      pVP                  \        \        4      8X  g   Q h\        P                  ! VP                  4      '       g   Q h\        R R \        P                  R.\        R R7      pVP                  \        \        R 4      8X  g   Q hVP                  R 8X  g   Q hR# )ABr   r   r   N)r   r   r   objectr   r   r   r   r   s   & r   test_constructor_object_dtype.TestConstructors.test_constructor_object_dtype?   s    3RVVS1@yyK////xx''''3RVVS1CPyyK4444~~$$$r   c                p   . ROp\        V\        R R7      pVP                  \        \        R 4      8X  g   Q hVP                  R J g   Q h\
        P                  ! V\        R7      pR \        W#RR7       4       p\
        P                  ! V\
        P                  R7      P                  4       '       g   Q hR# )Fr7   r   c              3   l   "   T F*  w  r\        V4      \        V4      8H  ;'       d    W8H  x  K,  	  R # 5iN)type).0xys   &  r   	<genexpr>KTestConstructors.test_constructor_object_dtype_bool_fill.<locals>.<genexpr>P   s3      
; GtAw))16);s   24T)strictN)Fr   g      Y@g        )r   r8   r   r   r   r   arrayzipfromiterbool_all)r   datar   arr_expectedits   &    r   'test_constructor_object_dtype_bool_fill8TestConstructors.test_constructor_object_dtype_bool_fillI   s    %$f?yyK6666~~&&&xxF3
Cd;
 {{2RXX.224444r   r   c                    \         P                  ! \        R R7      ;_uu_ 4        \        ^ ^\        P
                  .VR7       RRR4       R#   + '       g   i     R# ; i)zCannot convertmatchr   N)pytestraises
ValueErrorr   r   r   )r   r   s   &&r   test_constructor_na_dtype*TestConstructors.test_constructor_na_dtypeV   s7    ]]:-=>>Arvve4 ?>>>s   AA	c                ,   \         P                  ! R ^RR7      p\        \        P                  ! VRR7      4      pRp\
        P                  ! \        VR7      ;_uu_ 4        \        V4      pRRR4       \
        P                  ! XV4       \
        P                  ! \        VR7      ;_uu_ 4        \        \         P                  ! V4      4      pRRR4       \
        P                  ! WB4       R#   + '       g   i     L; i  + '       g   i     L;; i)z
2016-01-01z
US/Pacific)periodstzzdatetime64[ns]r   zloses timezone informationrP   N)
pd
date_ranger   r   asarrayr#   assert_produces_warningUserWarningr$   Series)r   dtir'   msgr&   s   &    r   +test_constructor_warns_when_losing_timezone<TestConstructors.test_constructor_warns_when_losing_timezone[   s    mmL!Erzz#5EFG*''3?? %F @ 	  2''3?? 30F @ 	  2 @?
 @?s   !C00 D0D 	D	c                n   \        ^^.\        ^^^.4      R7      p\        . R
ORR7      p\        P                  ! W4       VP                  \        \        P                  4      8X  g   Q hVP                  ^ 8X  g   Q h\        . RO\        ^. RO4      \        P                  ^ R7      p\        . RO\        P                  ^ R7      p\        P                  ! W4       VP                  \        \        P                  4      8X  g   Q hVP                  ^ 8X  g   Q h\        ^^.\        ^^^.4      ^ \        P                  R7      p\        . R
O^ \        P                  R7      p\        P                  ! W4       VP                  \        \        P                  4      8X  g   Q hVP                  ^ 8X  g   Q h\        . RO\        ^. RO4      R^ R7      p\        . RORR	7      p\        P                  ! W4       VP                  \        \        P                  4      8X  g   Q hVP                  ^ 8X  g   Q hR# )r
   )rJ   sparse_indexinteger)kind)rJ   re   r   r   r7   rJ   re   r   r   r   Nr   r   r
   r   r   r!   )r   r
   r   r"   	r   r   r#   r$   r   r   r   r   r   )r   r   r'   exps   &   r   test_constructor_spindex_dtype/TestConstructors.test_constructor_spindex_dtypek   s   1vHQA4GH |)<
  /yyK1111~~"""!!Y/((	
 ,bhh1E
  *yyK1111~~"""Qhq1a&&9arxx
 ,1BHHE
  *yyK1111~~"""!!Y/	
 ,d3
  *yyK1111~~"""r   re   Nc           	     Z   R p\         P                  ! \        VR7      ;_uu_ 4        \        ^VRR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        ^\	        ^^ .4      RR7       RRR4       R#   + '       g   i     LX; i  + '       g   i     R# ; i)zFCannot construct SparseArray from scalar data. Pass a sequence insteadrP   N)rJ   re   r   )rR   rS   	TypeErrorr   r   )r   re   ra   s   && r   %test_constructor_spindex_dtype_scalar6TestConstructors.test_constructor_spindex_dtype_scalar   sq     W]]9C00Q\F 1 ]]9C00QXa!-=TJ 10 10 100s   B"BB	B*	c                   \        ^^.\        ^^^.4      ^ RR7      p\        . RO^ RR7      p\        P                  ! W4       VP                  \        \        P                  4      8X  g   Q hVP                  ^ 8X  g   Q hR# )r
   Nrh   r   ri   rj   )r   r   rk   s   &  r   0test_constructor_spindex_dtype_scalar_broadcastsATestConstructors.test_constructor_spindex_dtype_scalar_broadcasts   so    Qhq1a&&9at
 ,1DA
  *yyK1111~~"""r   zdata, fill_value      ?g       @TFz
2017-01-01c                    \        V4      P                  p\        V4      '       d   \        V4      '       g   Q hR # W28X  g   Q hR # r=   )r   r   r   )r   rJ   r   r&   s   &&& r   $test_constructor_inferred_fill_value5TestConstructors.test_constructor_inferred_fill_value   s9     T"--
<<<'''r   formatsizec                   \         P                  ! R 4      pVP                  V^RVR7      p\        P                  ! V4      p\
        P                  ! V4      pVP                  4       P                  4       p\        P                  ! WV4       R# scipy.sparseg      ?)densityry   N)rR   importorskiprandomr   from_spmatrixr   r\   toarrayravelr#   assert_numpy_array_equal)r   rz   ry   	sp_sparsematr&   r'   s   &&&    r   test_from_spmatrix#TestConstructors.test_from_spmatrix   sm     ''7	tQFC**3/F#;;=&&(
##F5r   c                :   \         P                  ! R 4      pVP                  ^
^RVR7      p^ VP                  ^ &   \        P
                  ! V4      p\        P                  ! V4      pVP                  4       P                  4       p\        P                  ! WE4       R# r|   )rR   r   r   rJ   r   r   r   r\   r   r   r#   r   )r   ry   r   r   r&   r'   s   &&    r   *test_from_spmatrix_including_explicit_zero;TestConstructors.test_from_spmatrix_including_explicit_zero   sx    ''7	r1c&A**3/F#;;=&&(
##F5r   c                   \         P                  ! R 4      pVP                  ^^RR7      p\         P                  ! \        RR7      ;_uu_ 4        \
        P                  ! V4       RRR4       R#   + '       g   i     R# ; i)r}   csc)ry   znot '4'rP   N)rR   r   eyerS   rT   r   r   )r   r   r   s   &  r   test_from_spmatrix_raises*TestConstructors.test_from_spmatrix_raises   sT    ''7	mmAqm/]]:Y77%%c* 8777s   A00B	c                    \         P                  ! \        R R7      ;_uu_ 4        \        \        P
                  ! ^
4      P                  R4      4       RRR4       R#   + '       g   i     R# ; i)zexpected dimension <= 1 datarP   N)r      )rR   rS   ro   r   r   arangereshape)r   s   &r   %test_constructor_from_too_large_array6TestConstructors.test_constructor_from_too_large_array   s?    ]]9,JKK		"--f56 LKKKs   /AA/	c                    \        . RO^ R7      p\        V4      pVP                  ^ 8X  g   Q h\        P                  ! VP                  VP                  4       R# )r   r   N)
r   r   r
   r   r"   r   r   r   r      )r   r   r#   assert_almost_equalr-   )r   zarrress   &  r   test_constructor_from_sparse-TestConstructors.test_constructor_from_sparse   sC    9aH$~~"""
s}}dnn=r   c                   \         P                  ! \         P                  \         P                  ^^^\         P                  ^^\         P                  ^.
4      p\        V4      p\        VRR7      p^ VP                  R&   VP                  R,          ^ 8H  P                  4       '       d   Q h\        V4      p^ VP                  R&   VP                  R,          ^ 8H  P                  4       '       g   Q hR# )r
   T)copy:Nr"   NN)r   rE   r   r   r-   anyrI   )r   arr_datar   cpnot_copys   &    r   test_constructor_copy&TestConstructors.test_constructor_copy   s    88RVVRVVQ1bffaBFFANO(#4(RMM"%*//1111s#!"2b!Q&++----r   c                "   \         P                  ! . RO4      p\        VR \        R7      pVP                  \        \        4      8X  g   Q h\        P                  ! VP                  \         P                  ! RR.4      4       \        P                  ! VP                  P                  \         P                  ! ^^.\         P                  4      4       VP                  4       pVP                  \        8X  g   Q h\        P                  ! W14       R# )FTr   N)FFTTFF)r   rE   r   boolr   r   r#   r   r-   sp_indexindicesr1   to_denser   rJ   r   denses   &   r   test_constructor_bool&TestConstructors.test_constructor_bool   s    xx@A$5=yyK----
##CMM288T4L3IJ 	##CLL$8$8"((Aq6288:TU{{d"""
##E0r   c                   \        . RORR7      pVP                  \        \        P                  4      8X  g   Q hVP
                  '       d   Q h\        . RO\        P                  R7      pVP                  \        \        P                  4      8X  g   Q hVP
                  '       d   Q h\        . RO\        P                  R R7      pVP                  \        \        P                  R 4      8X  g   Q hVP
                  '       g   Q hR# )TNr   r7   )TFT)r   r   r   r   rH   r   r   s   & r    test_constructor_bool_fill_value1TestConstructors.test_constructor_bool_fill_value   s    -T:yyK1111>>>!!-RXX>yyK1111>>>!!-RXX$OyyK$7777~~~~r   c                   \         P                  ! R \         P                  ^.\         P                  R7      p\	        V\         P                  R7      pVP
                  \        \         P                  4      8X  g   Q h\        P                  ! VP                  \         P                  ! ^^.\         P                  R7      4       \        P                  ! VP                  P                  \         P                  ! ^ ^.\         P                  R7      4       VP                  4       pVP
                  \         P                  8X  g   Q h\        P                  ! W14       R# )ru   r   N)r   rE   r   float32r   r   r   r#   r   r-   r   r   r1   r   r   s   &   r   test_constructor_float32)TestConstructors.test_constructor_float32	  s    xxbffa(

;$bjj1yyK

3333
##CMM288QF"**3UV 	##LL  "((Aq6"B	
 {{bjj(((
##E0r    )coor   csr)'__name__
__module____qualname____firstlineno__r   r(   r.   r2   r9   rM   rR   markparametrizer   r    rU   rb   rl   r   rp   rs   r   rE   r   rZ   	TimestampNaTrw   r   r   r   r   r   r   r   r   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s    #<3
;;%5 [[W{3':C&@A5 B53 &#P [[^dHQ4D-EFK GK# [[XXq!fq!XXsCj!266*E]E"ll<()2662		
(( [[X'<=[[VaW-6 . >6 [[X'<=	6 >	6+7>
.11 1r   r   )numpyr   rR   pandas._libs.sparser   pandasrZ   r   r   pandas._testing_testingr#   pandas.core.arrays.sparser   r   r   r   r   <module>r      s*      (   1I1 I1r   