+
    yȇi,                        R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIt	^ RI
Ht ^ RIHt ]P                  ! ]P                   ! RR.]R7      ]P                   ! ^ ^.]R7      ]P                   ! ^ ^.]R7      ]P                   ! ^ R2.]R7      ]P                   ! RR	.]R7      ]P                   ! ^ ^.R
R7      ]P                   ! ^ ^.RR7      .R7      R 4       t]P.                  P1                  R. R3O4      R 4       t]P.                  P1                  R. R4O4      R 4       tR tR tR tR tR tR t R t!R t"R t#R t$R t%]P.                  PM                  ]'       * RR7      ]P.                  P1                  RRR.4      R  4       4       t'R! t(R" t)R# t*R$ t+R% t,]P.                  P1                  R&]PZ                  ]P\                  ]P^                  .4      R' 4       t0R( t1R) t2]P.                  P1                  RR].4      R* 4       t3R+ t4R, t5]P.                  P1                  R]Pl                  ]Pn                  .4      R- 4       t8R. t9]P.                  P1                  R]Pt                  ]Pv                  ]Px                  ]Pz                  ]Pn                  ]P|                  ]P~                  ]P                  ]Pl                  .	4      R/ 4       tAR0 tBR1 tCR# )5zV
Additional tests for NumpyExtensionArray that aren't covered by
the interface tests.
N)np_version_gt2NumpyEADtype)NumpyExtensionArrayabdtypeTFdatetime64[ns]timedelta64[ns])paramsc                6    V P                   P                  4       # )z_
Parametrized fixture for NumPy arrays with different dtypes.

This excludes string and bytes.
)paramcopy)requests   &u/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/arrays/numpy_/test_numpy.pyany_numpy_arrayr      s    " ==    zdtype, expectedc                 @    \        V 4      p V P                  VJ g   Q hR # N)r   _is_numericr	   expecteds   &&r   test_is_numericr   *   "      E(((r   c                 @    \        V 4      p V P                  VJ g   Q hR # r   )r   _is_booleanr   s   &&r   test_is_booleanr   >   r   r   c                  h    \        \        P                  ! R 4      4      p \        V 4      R8X  g   Q hR# )int64zNumpyEADtype('int64')N)r   npr	   reprr   s    r   	test_reprr"   R   s(    '*+E;1111r   c                      \         P                  ! R 4      p \        \        P                  ! R 4      4      pW8X  g   Q hR# )r   N)r   construct_from_stringr    r	   )resultr   s     r   test_constructor_from_stringr&   W   s1    //8FBHHW-.Hr   c                 B    \        V 4      p\        V4      pW!8X  g   Q hR # r   r   )any_numpy_dtyper	   r%   s   &  r   test_dtype_idempotentr)   ]   s     )E% F??r   c                      \         P                  ! \        R R7      ;_uu_ 4        \        . RO4       RRR4       R#   + '       g   i     R# ; i)zNumPy arraymatchN         )pytestraises
ValueErrorr    r   r   test_constructor_no_coercionr5   h   s*    	z	7	7I& 
8	7	7	7s	   =A	c                      \         P                  ! . RO4      p \        P                  ! \	        V 4      RR7      pVP
                  V Jg   Q hR# )r.   Tr   Nr-   )r    arraypdSeriesr   values)ndarraysers     r   !test_series_constructor_with_copyr>   m   s8    hhy!G
))'0t
<C::W$$$r   c                      \         P                  ! . RO4      p \        P                  ! \	        V 4      RR7      p\        P                  ! . RORR7      p\
        P                  ! W4       R# )r.   float64r   Nr-   )      ?g       @g      @)r    r8   r9   r:   r   tmassert_series_equal)r<   r%   r   s      r   #test_series_constructor_with_astyperD   t   sD    hhy!GYY*739EFyy	:H6,r   c                      \         P                  ! . RORR7      p \        P                  ! V RR7      p\        \         P                  ! . RORR7      4      p\        P
                  ! W4       R# )r.   r   r   uint64Nr-   )r    r8   r   _from_sequencerB   assert_extension_array_equalarrr%   r   s      r   test_from_sequence_dtyperK   {   sG    
((9G
,C //8DF"288IX#FGH##F5r   c                      \         P                  ! ^ ^.4      p \        V RR7      p\        P                  ! W4      '       d   Q hR# )    Tr7   N)r    r8   r   rB   shares_memoryrJ   r%   s     r   test_constructor_copyrP      s:    
((Aq6
C 40F,,,,,r   c                 n    T p\        V4      pVP                  P                  VP                  8X  g   Q hR # r   )r   r	   numpy_dtyper   nparrrJ   s   &  r   test_constructor_with_datarU      s-    E
e
$C99  EKK///r   c                  T   \        \        P                  ! . RO4      4      p V P                  4       pWP                  J g   Q hV P                  RR7      pWP                  Jg   Q hV P                  RR7      p\        P                  ! . RORR7      p\
        P                  ! W4       R# r.   Tr7   f8r   Nr-   )r   r    r8   to_numpy_ndarrayrB   assert_numpy_array_equalrI   s      r   test_to_numpyr\      s~    
bhhy1
2C\\^F\\!!!\\t\$F%%%\\\%Fxx	.H1r   c                  r   \        \        P                  ! . RO4      4      p RV n        V P	                  4       pVP
                  P                  '       d   Q hV P	                  RR7      pVP
                  P                  '       g   Q hV P	                  RR7      pVP
                  P                  '       g   Q hR# rW   )r   r    r8   	_readonlyrY   flags	writeablerO   s     r   test_to_numpy_readonlyra      s    
bhhy1
2CCM\\^F||%%%%%\\t\$F<<!!!!!\\\%F<<!!!!!r   z!copy keyword introduced in np 2.0)reasonr	   r   c                    \        \        P                  ! . RORR7      4      pRVn        \        P                  ! WR7      pVP
                  P                  '       d   Q h\        P                  ! WRR7      pVP
                  P                  '       g   Q h\        P                  ! WRR7      pVP
                  P                  '       d   Q hR# )r.   r   r   T)r	   r   FNr-   )r   r    r8   r^   asarrayr_   r`   )r	   rJ   r%   s   &  r   test_asarray_readonlyre      s     bhhy@
ACCMZZ)F||%%%%%ZZt4F<<!!!!!ZZu5F||%%%%%%r   c                     T p\        VR R7      pV^,          V^ &   V^,          V^ &   \        P                  ! VP                  4       V4       R# )Tr7   N)r   rB   r[   rY   rS   s   &  r   test_setitemrg      sC    E
e$
/CVCFQxE!H6r   c                      \         P                  ! . RORR7      p \        V 4      p Rp\        P                  ! \
        VR7      ;_uu_ 4        V P                  V4       RRR4       R#   + '       g   i     R# ; i)r.   r   r   z)cannot perform not_a_method with type intr+   Nr-   )r    r8   r   r1   r2   	TypeError_reducerJ   msgs     r   test_bad_reduce_raisesrm      sM    
((9G
,C
c
"C
5C	y	,	,C 
-	,	,	,s   A((A9	c                      \        \        P                  ! . RO4      4      p Rp\        P                  ! \
        VR7      ;_uu_ 4        V P                  RR7       RRR4       R#   + '       g   i     R# ; i)r.   z/the 'keepdims' parameter is not supported .*allr+   T)keepdimsNr-   )r   r    r8   r1   r2   r3   allrk   s     r   $test_validate_reduction_keyword_argsrq      sH    
bhhy1
2C
;C	z	-	- 
.	-	-	-s   A%%A6	c                  ~   . ROp \         P                  ! V 4      pVP                  pVP                  4       V^,          J g   Q hVP                  4       V^,          J g   Q h\        P
                  P                  V4      pW2^,          8X  g   Q h\        P
                  P                  V4      pW2^,          8X  g   Q hR# )jN))rs   klm)rv   op)ry   rt   )r9   r:   r8   maxr    maximumreduce)valsr=   rJ   r%   s       r   test_np_max_nested_tuplesr      s    D
 ))D/C
))C779A779AZZs#FVZZs#FVr   c                  B   \         P                  ! ^4      P                  ^^4      p \        V 4      p\         P                  P                  V^ R7      p\        P                  ! W!R,          4       VP                  ^ R7      p\        P                  ! W1R,          4       R# )   )axisN)	r    arangereshaper   r}   r~   rB   rH   r|   )rawrJ   resalts       r   test_np_reduce_2dr      sr    
))B-

1
%C
c
"C
**

Ca

(C##CR1
''q'/C##CR1r   ufuncc                 :   \        \        P                  ! . RO4      4      pV ! V4      p\        V ! VP                  4      4      p\        P
                  ! W#4       \        \        P                  ! . RO4      4      pV ! WR7       \        P
                  ! WC4       R# )rA   )outNg              rA   )      "r   r   )r   r    r8   rZ   rB   rH   )r   rJ   r%   r   r   s   &    r   test_ufunc_unaryr     sl    
bhh'78
9C3ZF"5#67H##F5 bhh'9:
;C	###C2r   c                     \        \        P                  ! . RO4      4      p \        P                  ! V \        P                  ! V ^4      4      w  r\        P                  ! V P
                  \        P                  ! V P
                  ^4      4      w  r4\        V4      p\        V4      p\        P                  ! W4       \        P                  ! W$4       R# )rA   Nr   )r   r    r8   divmodaddrZ   rB   rH   )rJ   r1r2e1e2s        r   
test_ufuncr     s    
bhh'78
9CYYsBFF3N+FBYYs||RVVCLL!%<=FB	R	 B	R	 B##B+##B+r   c                      \        \        P                  ! . RO4      4      p W ,           p\        \        P                  ! . RO4      4      p\        P                  ! W4       R# )r.   Nr-   )r/         r   r    r8   rB   rH   )xr%   r   s      r   test_basic_binopr     s?     	BHHY/0AUF"288I#67H##F5r   c                     \        \        P                  ! . ROV R7      4      pRV^ &   \        \        P                  ! . ROV R7      4      p\        P                  ! W4       R# )r   r   tN)r   r   c)r   r   r   r   )r	   rJ   r   s   &  r   test_setitem_object_typecoder   "  sC    
bhheD
ECCF"288O5#IJH##C2r   c                  d   \        \        P                  ! . RO4      4      p \        P                  ! \
        RR7      ;_uu_ 4        RV ^ &   RRR4       RV ^ &   \        V ^ ,          \        \        P                  34      '       g   Q \        V ^ ,          4      4       hR#   + '       g   i     L[; i)r.   intr+   r   N      @r-   )
r   r    r8   r1   r2   r3   
isinstancer   integertype)rJ   s    r   test_setitem_no_coercionr   *  su    
bhhy1
2C	z	/	/A 
0
 CFc!fsBJJ/00>$s1v,>0 
0	/s   BB/	c                  D   \        \        P                  ! . RO4      4      p V P                  4       pV R,          p\        P                  ! V 4      p^	V ^ &   V^ ,          ^	8X  g   Q hV^ ,          ^	8X  g   Q hV^ ,          ^	8X  g   Q hRV R&   ^VR&   V R,          ^8X  g   Q hR# )r.   :NNNr   Nr-   r   )r   r    r8   viewrd   )rJ   view1view2view3s       r   test_setitem_preserves_viewsr   6  s    
bhhy1
2CHHJEFEJJsOECF8q==8q==8q==CGE"Ir7a<<r   c                 D   \        \        P                  ! . V R 7      4      p\        P                  ! RR.4      pVP                  VRR7      p\        \        P                  ! \        P                  \        P                  .4      4      p\        P                  ! W44       R# )r   r   g      ?linear)interpolationN)	r   r    r8   r9   Index	_quantilenanrB   rH   )r	   rJ   idxr%   r   s   &    r   test_quantile_emptyr   G  sk     bhhr7
8C
((C:
C]]3h]7F"288RVVRVV,<#=>H##F5r   c                  ,   \         P                  ! . RO\         P                  R7      p \        V 4      pVP	                  4       w  r#\
        P                  ! V 4      w  rE\        P                  ! W$4       \        P                  ! V\        V4      4       R# )r.   r   Nr-   )	r    r8   rF   r   	factorizer9   rB   r[   rH   )rJ   obj	res_codes
res_unique	exp_codes
exp_uniques         r   test_factorize_unsignedr   R  sc    
((9BII
.C
c
"CMMOILL-I	5##J0CJ0OPr   c                    V \         P                  8X  d?   \        \         P                  ! . ROV R7      4      p\         P                  ! \
        4      pM3\        \         P                  ! . ROV R7      4      p\         P                  pVP                  R	.RR7      pVP                  P                  V8X  g   Q hVP                  R	.RRR7      pVP                  P                  V8X  g   Q hR# )
FTr   
allow_fillg      @)r   
fill_valueNFTFr-   r   )	r    bool_r   r8   r	   objectr@   takerR   )r	   r8   r   r%   s   &   r   &test_take_assigns_floating_point_dtyper   _  s      #BHH-A$OP88F##BHHYe$DE::ZZZ.F<<##x///ZZ#Z>F<<##x///r   c                      \        \        P                  ! . RO\        P                  R7      4      p V P	                  R.R R7      pVP
                  P                  \        P                  8X  g   Q hR# )Fr   r   Nr   r   )r   r    r8   r   r   r	   rR   )r8   r%   s     r   "test_take_preserves_boolean_arraysr   }  sL    )=RXX NOEZZZ/F<<##rxx///r   c                    T p\        V4      pVP                  R 8X  d   RpMVP                  R8X  d   RpM|\        VP                  4      P                  R4      '       d   RpMOVP                  R8X  d   RpM;VP                  R8X  d   R	pM'VP                  R
8X  d   RpMVP                  R8X  d   RpRX RVP                   2p\	        V4      pWT8X  g   Q V RV 24       hR# )r   z
['a', 'b']r@   z
[0.0, 1.0]r   z[0, 1]
complex128z[0j, (1+2j)]boolz[True, False]r
   z>[1970-01-01T00:00:00.000000000, 1970-01-01T00:00:00.000000001]r   z[0 nanoseconds, 1 nanoseconds]z<NumpyExtensionArray>
z
Length: 2, dtype: z vs N)r   r	   str
startswithr!   )r   nparrayrJ   r;   r   r%   s   &     r   test_array_reprr     s    G
g
&C}} 	)	#	W]]		&	&u	-	-	,	&	&	  	*	*Q	+	+1(0DW]]OTH#YF8&hZ88r   y      ?       @)
r   T)r   T)uintT)floatT)complexTr   FbytesFr
   Fr   FvoidF)
r   )r   F)r   F)r   F)r   Fr   r   r   r   r   )D__doc__numpyr    r1   pandas.compat.numpyr   pandas.core.dtypes.dtypesr   pandasr9   pandas._testing_testingrB   pandas.arraysr   fixturer8   r   r   r   r   r   r   markparametrizer   r   r"   r&   r)   r5   r>   rD   rK   rP   rU   r\   ra   skipifre   rg   rm   rq   r   r   absnegativepositiver   r   r   r   r   r   r   rF   r   r   r   uint8uint16uint32int8int16int32r   r   r   r4   r   r   <module>r      s  
   . 2   - 
#s6*
!Qu%
!Qs#
!VG,
$d+
!Q/0
!Q01
 
  ))
 ))
2
'
%-6-0
2
" &/RS4/2
& 3 T
&"7*2 2662;;"DE	3 F	3,6 4.13 23	?" 288RYY"786 96
Q 


		
		
		




00 09r   