+
    CDj<                        R t ^ RIt^ RIt^ RIHt ^ RIHtHt ^ RIt^ RI	t
^ RIHt ^ RIHtHt R t]P"                  P%                  R. RO4      R 4       tR	 t]P"                  P%                  R
. RO4      R 4       tR tR tR tR tR t]P"                  P%                  RR4      R 4       t]P"                  P%                  RR4      R 4       t]P"                  P%                  RRR.4      R 4       t]P"                  P%                  R. RO4      R 4       t]P"                  P%                  RR4      R 4       tR t ]P"                  P%                  R]!]"34      R 4       t#]P"                  P%                  R]
PH                  ! R4      ]
PH                  ! R4      34      R 4       t%R  t&R! t'R" t(R# t)R$ t*]P"                  P%                  R%. RO4      ]P"                  P%                  R&. RO4      R' 4       4       t+R( t,R) t-R* t.R+ t/]P"                  P%                  RR,4      R- 4       t0]P"                  P%                  RR.]
PH                  ! R/4      3R0]
PH                  ! R14      3.4      R2 4       t1R3 t2R4 t3]P"                  P%                  R]
Ph                  R5,          4      ]P"                  Pk                  R64      R7 4       4       t6]P"                  P%                  R]
Ph                  R5,          4      ]P"                  Pk                  R64      R8 4       4       t7]P"                  P%                  R]
Pp                  ]
Pr                  34      ]P"                  P%                  R9R4      R< 4       4       t:R= t;R> t<R? t=]P"                  P}                  ]'       * R@RA7      RB 4       t?RC t@]P"                  P%                  RD^ ]!.RE34      RF 4       tARG tB]P"                  P%                  RHR4      RI 4       tCRJ tD]P"                  P%                  RKR4      RL 4       tE]P"                  P%                  RKR4      RM 4       tFRN tGRO tHRP tIRQ tJRR tKRS tLRT tM]P"                  P%                  RUR4      ]P"                  P%                  RVR4      ]P"                  P%                  RWRR.4      RX 4       4       4       tN]P"                  P%                  R
R4      RY 4       tO]P"                  P%                  RRZ.RRRRRRRRRRRRR[]P! R4      3R.4      ]P"                  P%                  R\R;R:.4      R] 4       4       tQ]P"                  P%                  R]
Ph                  R5,          R^,           R_,           4      R` 4       tR]P"                  P%                  RRa4      Rb 4       tS]P"                  P%                  RRa4      ]P"                  P%                  Rc. RO4      Rd 4       4       tT]P"                  P%                  R]
Ph                  R5,          Re,           R_,           4      Rf 4       tU]P"                  P%                  R]
Ph                  R5,          Re,           R_,           4      Rg 4       tV]P"                  P%                  RURhRi.RhRj..4      Rk 4       tW]P"                  P%                  RURhRl.RhRm.RhRn.RhRo..4      Rp 4       tX]P"                  P%                  Rq. RO4      Rr 4       tYRs tZRt t[ ! Ru Rv4      t\Rw t]Rx t^Ry t_Rz t`]P"                  P%                  RR4      R{ 4       ta]P"                  P%                  R|R4      R} 4       tb]P"                  P%                  RRR.4      ]P"                  P%                  R~R4      R 4       4       tcR tdR teR tf]P"                  Pk                  R4      R 4       tg]P"                  P%                  RR4      R 4       th]P"                  P%                  RR4      R 4       tiR# )z
Tests specific to `np.loadtxt` added during the move of loadtxt to be backed
by C code.
These tests complement those found in `test_io.py`.
N)StringIO)NamedTemporaryFilemkstemp)assert_equal)HAS_REFCOUNTassert_array_equalc                     \        R4      p \        P                  ! . RO. RO. RO. RO.4      p\        \        P                  ! V RR7      V4       R# )	z0Test that both 'e' and 'E' are parsed correctly.zE1.0e-1,2.0E1,3.0
4.0e-2,5.0E-1,6.0
7.0e-3,8.0E1,9.0
0.0e-4,1.0E-1,2.0,	delimiterN)皙?g      4@      @)g{Gz?      ?   )gy&1|?g      T@	   )    r      )r   nparrayr   loadtxt)dataexpecteds     V/data/cameron/venvs/s3viz/lib/python3.14/site-packages/numpy/lib/tests/test_loadtxt.pytest_scientific_notationr      sD     D xx	./;GH rzz$#6A    commentc                     R p\        VP                  RV 4      4      p\        P                  ! VRV R7      p\	        VRR.RR.RR	..4       R
# )z,# IGNORE
1.5, 2.5# ABC
3.0,4.0# XXX
5.5,6.0
#r	   r   comments      ?      @r         @      @      @N)r   replacer   r   r   )r   contenttxtas   &   r   test_comment_multiple_charsr)   #   sK    @G
7??30
1C


3#8Ac3Z#sc3Z89r   c                     \        R4      p \        P                  ! R\        P                  3R\        P                  3RR\        P
                  3.4      p\        P                  ! . ROVR7      pWV3# )zr
Function providing heterogeneous input data with a structured dtype, along
with the associated structured array.
zo1000;2.4;alpha;-34
2000;3.1;beta;29
3500;9.9;gamma;120
4090;8.1;delta;0
5001;4.4;epsilon;-99
6543;7.8;omega;-1
f0f1f3dtypef2S7)i  g333333@alphai)i  g@beta   )i  g#@gammax   )i  g333333 @deltar   )i  g@epsiloni)i  g333333@omega)r   r   r/   uint16float64int8r   )r   r/   r   s      r   mixed_types_structuredr@   +   sp    
 "	D HH
			T2::.tRWWoNE xx	
 
H   r   skiprowsc                 n    \        4       w  rp\        P                  ! WR V R7      p\        WCV R 4       R# );)r/   r   rA   Nr@   r   r   r   )rA   r   r/   r   r(   s   &    r   1test_structured_dtype_and_skiprows_no_empty_linesrE   K   s0    24D


4hGAq89-.r   c                      \        4       w  rp\        P                  ! WR RR7      w  r4rV\        W2R,          4       \        WBR,          4       \        WRR,          4       \        WbR,          4       R# )rC   T)r/   r   unpackr+   r,   r1   r-   NrD   )r   r/   r   r(   bcds          r   test_unpack_structuredrK   R   sU    24DDTJJA!q4.)q4.)q4.)q4.)r   c                      \         P                  ! RR.4      p \        R4      p\         P                  ! RR	.V R7      p\	        \         P
                  ! VRV R7      V4       R# )
r(   z0,1,2,3
6,7,8,9
r.   r	   r   r/   N)r(   u1r   )rH   rN   r   r      r      ))r      )   r   r   r/   r   r   r   r   r/   r   r   s      r    test_structured_dtype_with_shaperX   \   sN    HHnn56E()Dxx)+;<EJHrzz$#UCXNr   c                      \         P                  ! R.4      p \        R4      p\         P                  ! R.V R7      p\	        \         P
                  ! WR7      V4       R# )r(   z0 1 2 3
r.   N)r(   rN   )r   r   )rO   rV   rW   s      r   &test_structured_dtype_with_multi_shaperZ   c   sE    HH)*+EK Dxx,-U;Hrzz$4h?r   c                  .   \         P                  ! R \        3R\        3.4      p \         P                  ! R\        3RV R	3.4      p\	        R4      p\         P
                  ! ^dR
R.3^RR.3.VR7      p\        \         P                  ! W!RR7      V4       R# )xycodepointsz100,1,2,3,4
200,5,6,7,8
r.   r	   r/   r   N)r   )      ?       @)r   r"   )      @r$   )g      @g       @)r   r/   floatintr   r   r   r   )pointdtr   r   s       r   test_nested_structured_subarrayrh   j   s    HHsElS%L12E	FC=8UD"9:	;B01Dxx8X&'8X&'	
 H rzz$C@(Kr   c                      \         P                  ! R RR7      p \        R4      p\         P                  ! RR	.V R7      p\	        \         P
                  ! VRV R7      V4       R# )
zi1, i4, i1, i4, i1, i4Talignz1,2,3,4,5,6
7,8,9,10,11,12
r.   r	   rM   N)rQ   r   rS         r   )rT   rU   r   
         rV   )rg   r   r   s      r   test_structured_dtype_offsetsrq   y   sL    	*$	7B34Dxx+-BC2NHrzz$#R@(Kr   paramc                    \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! R/ V R/B  RRR4       R#   + '       g   i     R# ; i)z;skiprows and max_rows should raise for negative parameters.zargument must be nonnegativematchNfoo.barpytestraises
ValueErrorr   r   rr   s   &r   "test_exception_negative_row_limitsr~      s9     
z)G	H	H


,, 
I	H	H	H   AA	c                     \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! R/ V R/B  RRR4       R#   + '       g   i     R# ; i)zargument must be an integerrt   ra   Nrv   rz   r{   	TypeErrorr   r   r}   s   &r   $test_exception_noninteger_row_limitsr      s7    	y(E	F	F


-- 
G	F	F	Fr   zdata, shapec                    \         P                  ! . RO4      pVP                  V4      p\        \         P                  ! \        V 4      \        R7      V4       \        \         P                  ! \        V 4      \        ^ R7      V4       \        \         P                  ! \        V 4      \        ^R7      V4       \        \         P                  ! \        V 4      \        ^R7      V4       R# )rQ   r.   )r/   ndminN)rQ   r   rS   rl   rm   )r   r   reshaper   r   r   re   )r   shapearrarr2ds   &&  r   test_ndmin_single_row_or_colr      s     ((?
#CKKErzz(4.<cBrzz(4.1EsKrzz(4.1EsKrzz(4.1EuMr   badvalc                     \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! RV R7       RRR4       R#   + '       g   i     R# ; i)zIllegal value of ndmin keywordrt   rw   )r   Nry   )r   s   &r   test_bad_ndminr      s2    	z)I	J	J


9F+ 
K	J	J	Jr   wsc                     \        R V  RV  RV  RV  RV  R24      p\        P                  ! . R	O. R
O. RO. RO.4      p\        \        P                  ! V\
        RRR7      V4       R# )z1 2z30

z
4 5 60z
  z  
7 8 z 90
  # comment
3 2 1Nr   r/   r   r   rQ   r      rl   rm   <   rT   rU   Z   rS   r   rQ   r   r   r   r   r   re   )r   r'   r   s   &  r   test_blank_lines_spaces_delimitr      st     
bTt D d 	C xxZYGHH


3cTC@(r   c            	          \        R 4      p \        P                  ! . RO. RO. RO. RO.4      p\        \        P                  ! V \
        RRR7      V4       R# )	z&1,2,30

4,5,60

7,8,90
# comment
3,2,1r	   r   r   Nr   r   r   r   r   )r'   r   s     r   !test_blank_lines_normal_delimiterr      s@    
A
BCxxZYGHH


3cS3?r   r/   c                     \        R 4      p\        P                  ! WR^R7      p\        VP                  V 4       \        V\        P
                  ! RR.RR..V R7      4       R# )	z1.5,2.5
3.0,4.0
5.5,6.0r	   r/   r   max_rowsz1.5z2.5z3.0z4.0r.   N)r   r   r   r   r/   r   r/   r'   ress   &  r   test_maxrows_no_blank_linesr      sO    
.
/C
**Sq
ACE"bhh?uMNr   f8i2c                     \        R 4      pRV  R2p\        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! WRR7       RRR4       R#   + '       g   i     R# ; i)z1,2
3,XXX
5,6z"could not convert string 'XXX' to z at row 1, column 2rt   r	   r`   Nr   rz   r{   r|   r   r   )r/   r'   msgs   &  r   !test_exception_message_bad_valuesr      sJ    
$
%C.ug5H
IC	z	-	-


3s3 
.	-	-	-s   AA*	c                      \        R 4      p R
R /p\        P                  ! RR.R\        P                  .RR..4      p\        P                  ! V \        P
                  RVR7      p\        W24       R	# )z1.5,2.5
3.0,XXX
5.5,6.0c                 F    V R 8X  d   \         P                  # \        V 4      # XXXr   nanrd   ss   &r   <lambda>2test_converters_negative_indices.<locals>.<lambda>       AJ"&&<E!H<r   r    r!   r   r#   r$   r	   r/   r   
convertersNr<   )r   r   r   r   r   r>   r   r'   convr   r   s       r    test_converters_negative_indicesr      s]    
.
/C<=Dxx#sc266]S#J?@H
**S

cd
KCr   c                  `   \        R 4      p RR /p\        P                  ! RR.R\        P                  .RR..4      p\        P                  ! V \        P
                  RV^ R.R7      p\        W24       \        P                  ! \        R	4      R^ R.RR
 /R7      p\        V^ R.^ R..4       R# )z$1.5,2.5,3.5
3.0,4.0,XXX
5.5,6.0,7.5
c                 F    V R 8X  d   \         P                  # \        V 4      # r   r   r   s   &r   r   ?test_converters_negative_indices_with_usecols.<locals>.<lambda>   r   r   r    g      @r   r#   g      @r	   )r/   r   r   usecolsz0,1,2
0,1,2,3,4c                     R# )rQ   r<    )r\   s   &r   r   r      s    r   )r   r   r   Nr<   )r   r   r   r   r   r>   r   r   r   s       r   -test_converters_negative_indices_with_usecolsr      s    
<
=C<=Dxx#sc266]S#J?@H
**jjBC  **X45W"|1EGCsaWq"g./r   c                      . ROp \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! V RR7       RRR4       R#   + '       g   i     R# ; i)1,2,3z2the number of columns changed from 3 to 4 at row 3rt   r	   r
   N)r   r   z4,3,2,1ry   )rowss    r   test_ragged_errorr      sF    (D	zF
H 
H


43'
H 
H 
H 
Hs   AA	c            	         \        R 4      p \        P                  ! ^ ^ .^ ^ .^ ^ ..4      p\        P                  ! V \        R^ R.R7      p\        W!4       \        R4      p \        P                  ! \        RR7      ;_uu_ 4        \        P                  ! V \        R^ R.R7       RRR4       R#   + '       g   i     R# ; i)$0,0,XXX
0,XXX,0,XXX
0,XXX,XXX,0,XXX
r	   r/   r   r   z0,0,XXX
0
0,XXX,XXX,0,XXX
z/invalid column index -2 at row 2 with 1 columnsrt   N)	r   r   r   r   rd   r   rz   r{   r|   r'   r   r   s      r   test_ragged_usecolsr      s    
<
=Cxx!Q!Q!Q01H
**Sq"g
FC
2
3C	zG
I 
I 	

3esQGD
I 
I 
I 
Is   !B00C	c                      \        R 4      p \        P                  ! V \        P                  ! . 4      R. R7      pVP                  R8X  g   Q hVP                  \        P                  ! . 4      8X  g   Q hR# )r   r	   r   N)rS   )r   r   r   r/   r   r'   r   s     r   test_empty_usecolsr     sU    
<
=C
**SR
HC9999$$$r   c1c2c                 B   \        R V  RV R24      p\        P                  ! V\        P                  ! R4      RR7      p\        P                  ! R V  R2P                  R4      RV R2P                  R4      .\        P                  ! R4      R7      p\        W44       R	# )
za,z	,c,1.0
e,z,2.0,gU12r	   r`   z,c,1.0ze,r.   N)r   r   r   r/   r   splitr   )r   r   r'   r   r   s   &&   r   test_large_unicode_charactersr     s     Rt:bT0
1C
**S3
?CxxbT		s	#r"V_%:%:3%?@hhuoH r   c                      \        R 4      p ^ R /p\        P                  ! V \        P                  ! R4      VRRR7      p\        P                  ! RR.RR	.R
R..4      p\        W#4       R# )u   cat,dog
αβγ,δεζ
abc,def
c                 "    V P                  4       # Nupperr   s   &r   r   -test_unicode_with_converter.<locals>.<lambda>  s
    r   r   r	   Nr/   r   r   encodingCATdogu   ΑΒΓu   δεζABCdef)r   r   r   r/   r   r   r'   r   r   r   s       r   test_unicode_with_converterr     si    
6
7C"#D
**hhuoC xx%(H)=u~NOHr   c                     \        R 4      p \        P                  ! R\        P                  3R\        P                  3R	.4      p^ R R
R /p\        P
                  ! WRVR7      p\        P                  ! . ROVR7      p\        W44       R# )z$1.5,2.5,Abc
3.0,4.0,dEf
5.5,6.0,ghI
mrc                 8    \        ^
\        V 4      ,          4      # )rn   )re   rd   r   s   &r   r   6test_converter_with_structured_dtype.<locals>.<lambda>,  s    R%(]+r   c                 "    V P                  4       # r   r   r   s   &r   r   r   ,  s
    1779r   r	   r   r.   N)r^   U8r<   ))   r!   r   )r   r"   DEF)7   r$   GHI)r   r   r/   int32float32r   r   r   )r'   rg   r   r   r   s        r   $test_converter_with_structured_dtyper   )  sr    
<
=C	C?S"**$5~F	GB+R1DED
**Scd
CCxx>bH r   c                     \        R4      p \        P                  p\        P                  ! V \        P
                  ! R4      VRRR7      p\        P                  ! RR.RR	..4      p\        W#4       R
# )a,  
With the 'bytes' encoding, tokens are encoded prior to being
passed to the converter. This means that the output of the converter may
be bytes instead of unicode as expected by `read_rows`.

This test checks that outputs from the above scenario are properly decoded
prior to parsing by `read_rows`.
zabc,def
rst,xyzU3r	   bytesr   r   r   RSTXYZN)r   r   r   r   r   r/   r   r   r   s       r   !test_converter_with_unicode_dtyper   4  s_     %
&C;;D
**rxx~$#C xx%%89Hr   c                      R R,          p V RR R,           p \        V ^,          4      p\        P                  ! VR\        R7      p\	        V\        P
                  ! RR.R	4      4       R# )
z	1.5, 2.5,P  N
r	   rM   r    r!   r<   )r   r   )r   r   r   rd   r   tile)rowr'   r   s      r   test_read_huge_rowr   F  sT    

C
cr(T/C
37
C
**SCu
5CbggsCj*56r   edfgFDGc                     Rp\         P                  ! V 4      p \         P                  ! V.V R7      R,          pW P                  R4      8X  g   Q hR# )0r.   z0.123456789Na  0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.123456789r   )r   r/   r   type)r/   fieldvalues   &  r   test_huge_floatr   N  sB     &EHHUOEJJwe,R0EJJ}----r   SS5UU5c                    \        R4      p\        P                  ! W RR7      p\        P                  ! RR.RR.RR	..VR
7      p\	        W44       \	        VP
                  V4       R# )z
The given dtype is just 'S' or 'U' with no length. In these cases, the
length of the resulting dtype is determined by the longest string found
in the file.
zAAA,5-1
BBBBB,0-3
C,4-9
r	   r`   AAAz5-1BBBBBz0-3Cz4-9r.   N)r   r   r   r   r   r/   )given_dtypeexpected_dtyper'   r   r   s   &&   r   test_string_no_length_givenr  W  s^     0
1C
**Ss
;Cxx
'5)C<8H N+r   c                     . ROp \        RP                  V 4      4      p\        P                  ! V4      p\        P                  ! V  Uu. uF  p\        V4      NK  	  up4      p\        W$4       R# u upi )z
Some tests that the conversion to float64 works as accurately as the
Python built-in `float` function. In a naive version of the float parser,
these strings resulted in values that were off by an ULP or two.
r   N)z0.9999999999999999z9876543210.123456z5.43215432154321e+300z0.901z0.333)r   joinr   r   r   rd   r   )stringsr'   r   r   r   s        r   test_float_conversionr  m  sY    G 499W%
&C
**S/Cxx737aq734H 4s   	A1c                     \        R 4      p \        P                  ! V \        RR7      pVP                  \        8X  g   Q h\        VRR.RR..4       \        VP                  \        P                  4      ^^ .^^..4       R# )z1, 0
10, -1r	   r`   TFN)r   r   r   boolr/   r   viewuint8r   s     r   	test_boolr    sk    
>
"C
**S
4C99sdE]T4L9:sxx)QFQF+;<r   
AllIntegerz0error:.*integer via a float.*:DeprecationWarningc                 L   \         P                  ! V 4      p \         P                  ! R .V R7      ^8X  g   Q hV P                  R8X  dF   \        P
                  ! \        4      ;_uu_ 4        \         P                  ! R.V R7       RRR4       M \         P                  ! R.V R7      R8X  g   Q hR FJ  p\        P
                  ! \        4      ;_uu_ 4        \         P                  ! V R2.V R7       RRR4       KL  	  R#   + '       g   i     Lb; i  + '       g   i     Kt  ; i)	z+2r.   uz-1
Nz-2
z2
r   )z++z+-z--z-+)r   r/   r   kindrz   r{   r|   )r/   signs   & r   test_integer_signsr    s     HHUOE::tfE*a///zzS]]:&&JJxu- '& zz6(%0B666(]]:&&JJ4&~U3 '& ) '& '&&s   *C?D?D	D#c                     \        R 4      p\        P                  ! \        4      ;_uu_ 4        \        P
                  ! WRR7       RRR4       R#   + '       g   i     R# ; i)z1.0, 2.1, 3.7
4, 5, 6r	   r`   Nr   )r/   r'   s   & r   %test_implicit_cast_float_to_int_failsr    s;     +
,C	z	"	"


3s3 
#	"	"	"   AA"	with_parensFTc                     R pV'       g#   VP                  RR4      P                  RR4      p\        P                  ! \        V4      V RR7      p\        P                  ! . RO. R	O.V R7      p\        W44       R# )
z*(1.0-2.5j),3.75,(7+-5.0j)
(4),(-19e2j),(0)( )r	   r`   r.   N)y      ?      g      @y      @      )r"   y            r   )r%   r   r   r   r   r   )r/   r  r   r   r   s   &&   r   test_complex_parsingr#    sb     	6AIIc2&&sB/
**Xa[
=Cxx	#%56eH r   c                      R  p \         P                  ! V ! 4       \        RR7      p\         P                  ! . RO. RO. RO. RO.4      p\	        W4       R# )c               3   f   "   \        ^4       F  p V  R^V ,           RV ^,           2x  K  	  R# 5i)rl   r	   Nrangeis    r   gen%test_read_from_generator.<locals>.gen  s2     qACqQqA'' s   /1r	   r`   N)r   r   r   )rQ   r   rQ   )r   rl   rl   )rS   r   r   )r   r   re   r   r   r*  r   r   s      r   test_read_from_generatorr-    s<    ( **SU#
5CxxIy)DEHr   c                      R  p \         P                  ! V ! 4       RRR7      p\         P                  ! . RORR7      p\        W4       R# )c               3   R   "   \        ^4       F  p V  RV ^,           2x  K  	  R# 5i)rS    Nr&  r(  s    r   r*  /test_read_from_generator_multitype.<locals>.gen  s'     qACqQ.  s   %'zi, dr0  r`   r.   N))r   g        )rQ   g      ?)r   r   )r   r   r   r   r,  s      r   "test_read_from_generator_multityper2    s6    ! **SU&C
8Cxx7vFHr   c                      R  p \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! V ! 4       RRR7       RRR4       R#   + '       g   i     R# ; i)c               3   *   "   . RO Rj  xL
  R#  L5i)1,2N)r5  s   3, 5i1  r   r   r   r   r*  )test_read_from_bad_generator.<locals>.gen  s     ***s   &non-string returned while reading datart   zi, ir	   r`   Nr   )r*  s    r   test_read_from_bad_generatorr8    sM    + 
F
H 
H


35#6
H 
H 
H 
Hs   AA"	zPython lacks refcounts)reasonc                  L  aa \        4       o^ oVV3R lp \        RR,          4      p\        P                  ! \        RR7      ;_uu_ 4        \
        P                  ! V\         ^ V /R7       RRR4       \        P                  ! S4      ^8X  g   Q hR#   + '       g   i     L/; i)r   c                 >   < SR 8  d   \        R4      hS^,          oS# )i  zfailed half-way through!)r|   )r\   already_readsentinels   &r   r   /test_object_cleanup_on_read_error.<locals>.conv  s&    $788r   zx
'  zat row 5000, column 1rt   r/   r   N)	objectr   rz   r{   r|   r   r   sysgetrefcount)r   r'   r<  r=  s     @@r   !test_object_cleanup_on_read_errorrD    ss    xHL 55=
!C	z)@	A	A


3f!T; 
B ??8$))) 
B	As    BB#	c                     \        R4      p \        P                  ! \        4      ;_uu_ 4        \        P
                  ! V RR7       RRR4       R#   + '       g   i     R# ; i)z9Test exception when a character cannot be encoded as 'S'.u   –r  r.   Nr   )r   s    r   #test_character_not_bytes_compatiblerF    s7    E?D	z	"	"


4t$ 
#	"	"	"r  r   r!  c                     R p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! \        R4      V R7       RRR4       R#   + '       g   i     R# ; i)z\converters must be a dictionary mapping columns to converter functions or a single callable.rt   1 2
3 4r   Nrz   r{   r   r   r   r   )r   r   s   & r   test_invalid_converterrK    sA    	*  
y	,	,


8J'D9 
-	,	,	,s   "AA$	c                     \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        R4      R\        /R7       RRR4       \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        R4      R\        /^ R7       RRR4       R#   + '       g   i     Lg; i  + '       g   i     R# ; i)zkeys of the converters dictrt   rH  r(   rI  N)r   r   )rz   r{   r   r   r   r   re   r   r   r   +test_converters_dict_raises_non_integer_keyrM    sy    	y(E	F	F


8J'S#J? 
G	y(E	F	F


8J'S#JJ 
G	F 
G	F	F	F	Fs   (B,9)B?,B<	?C	bad_col_indc                     \        R 4      p\        P                  ! \        RR7      ;_uu_ 4        \        P
                  ! W\        /R7       RRR4       R#   + '       g   i     R# ; i)rH  zconverter specified for columnrt   rI  N)r   rz   r{   r|   r   r   re   )rN  r   s   & r   'test_converters_dict_raises_non_col_keyrP    s?    JD	z)I	J	J


4#$67 
K	J	J	Js   AA)	c                      \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        R4      ^ ^/R7       RRR4       R#   + '       g   i     R# ; i)z4values of the converters dictionary must be callablert   rH  rI  NrJ  r   r   r   ,test_converters_dict_raises_val_not_callablerR    sJ    	yL
N 
N


8J'QF;
N 
N 
N 
Ns   $AA$	qc                    \        V  R V  RV  RV  RV  RV  R24      p\        P                  ! RR\        P                  3.4      p\        P                  ! . ROVR7      p\        P
                  ! WRV R	7      p\        WC4       R
# )alpha, xz, 2.5
beta, yz, 4.5
gamma, zz, 5.0
r,   r.   r	   r/   r   	quotecharNr+   r   )rU  r!   )rV  g      @)rW  rc   r   r   r/   r>   r   r   r   rS  r'   r/   r   r   s   &    r   test_quoted_fieldr^    s    
#XaSs'!GA3hqcIC HHlT2::$678Exx@H **S
BCs%r   c                    \        V  R V  RV  RV  RV  RV  R24      p\        P                  ! R
R\        P                  3.4      p\        P                  ! . ROVR7      p\        P
                  ! WRV R	7      p\        WC4       R# )rU  z	     2.5
rV  z 4.5
rW  z   5.0
r,   r.   NrX  rZ  r[  r\  r]  s   &    r   +test_quoted_field_with_whitespace_delimiterr`    s    
#XaS
1#WQCvaS8LC HHlT2::$678Exx@H **S
CCs%r   c                    \        R4      p \        P                  ! RR\        P                  3R\        P                  3.4      p\        P
                  ! \        RR7      ;_uu_ 4        \        P                  ! WRR7       RRR4       V P                  ^ 4       \        P                  ! R.VR	7      p\        P                  ! WRR
R7      p\        W24       R#   + '       g   i     L`; i)z1Support for quoted fields is disabled by default.z"lat,long", 45, 30
r,   r1   z.the dtype passed requires 3 columns but 4 werert   r	   r`   Nr.   "rX  )r+   U24)zlat,longg     F@g      >@)r   r   r/   r>   rz   r{   r|   r   seekr   r   )r'   r/   r   r   s       r   test_quote_support_defaultre  !  s    
)
*CHHmdBJJ%7$

9KLME	zB
D 
D


3s3
D
 HHQKxx/0>H
**S
DCs%
D 
Ds   )CC*	c                      \        R 4      p Rp\        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! V RRR7       RRR4       R#   + '       g   i     R# ; i)1,2
3,4z,.*must be a single unicode character or Nonert   r	   z''r   rY  Nr   rz   r{   r   r   r   )r'   r   s     r   test_quotechar_multichar_errorrj  2  sA    
:
C
9C	y	,	,


3#6 
-	,	,	,s   AA'	c            	         \        R 4      p Rp\        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! V RRRR7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! V RRR	.RR7       RRR4       \        P
                  ! V RRR
R7      p\        V^^.^^..4       R#   + '       g   i     L; i  + '       g   i     LQ; i)rg  zWwhen multiple comments or a multi-character comment is given, quotes are not supported.rt   r	   123rb  )r   r   rY  Nr   %')r   )r   rz   r{   r|   r   r   r   )r'   r   r   s      r   'test_comment_multichar_error_with_quotero  9  s    
:
C	$  
z	-	-


3#E 
.	z	-	-


3#c
cJ 
. **SC&C
HC1v1v&' 
.	-	-	-s   C9CC	C/	c                  ,   \        R 4      p \        P                  ! R\        P                  3R\        P                  3R	R\        P
                  3.4      p\        P                  ! . R
OVR7      p\        P                  ! WRRR7      p\        W24       R# )z{1000;2.4;'alpha';-34
2000;3.1;'beta';29
3500;9.9;'gamma';120
4090;8.1;'delta';0
5001;4.4;'epsilon';-99
6543;7.8;'omega';-1
r+   r,   r-   r.   rC   rn  rX  Nr0   r3   )	r   r   r/   r=   r>   r?   r   r   r   )r   r/   r   r   s       r   !test_structured_dtype_with_quotesrq  I  s}    $	D HH
			T2::.tRWWoNE xx	
 
H **T#
ECs%r   c                      \        R 4      p \        P                  ! . RORR7      p\        P                  ! V RRRR7      p\	        W!4       R# )z	1

"4"
""U1r.   r	   rb  r   r/   rY  N14r!  r   r   r   r   r   r   s      r   test_quoted_field_is_not_emptyry  f  s8    
>
"Cxxd3H
**SCts
CCr   c                      \        R 4      p \        P                  ! . RORR7      p\        P                  ! V RRRR7      p\	        W!4       R# )z1

"4"
"rs  r.   r	   rb  rt  Nru  rx  r   s      r   (test_quoted_field_is_not_empty_nonstrictr{  l  s:     =
!Cxxd3H
**SCts
CCr   c                      \        R 4      p \        P                  ! RRR7      p\        P                  ! V RRRR7      p\	        W!4       R# )z"Hello, my name is ""Monty""!"zHello, my name is "Monty"!U40r.   r	   rb  rX  Nrx  r   s      r   "test_consecutive_quotechar_escapedr~  t  s:    
3
4Cxx4EBH
**S
DCr   r   r   r   c           
        Ve   RpMV^8X  d   RpMR	p\        V 4      p\        P                  ! \        RR7      ;_uu_ 4        \        P
                  ! WAVR7      pRRR4       XP                  V8X  g   Q h\        RR7      ;_uu_ 4       pVP                  V 4       VP                  ^ 4       \        P                  ! \        RR7      ;_uu_ 4        \        P
                  ! WAVR7      pRRR4       VP                  V8X  g   Q h RRR4       R#   + '       g   i     L; i  + '       g   i     LA; i  + '       g   i     R# ; i)
zDCheck that a UserWarning is emitted when no data is read from input.Ninput contained no datart   )r   r   w)mode)r   rS   rP   )r   )
r   rz   warnsUserWarningr   r   r   r   writerd  )r   r   r   expected_shaper'   r   fhs   &&&    r   test_warn_on_no_datar  {  s    
 	!
4.C	k)B	C	Cjj7; 
D99&&&		%	%


\\+-FGG**Sw?C HyyN*** 
&	%	 
D	C HG 
&	%	%s1   DAD7D$	+D7D!	$D4/D77E	c                     R p\        V4      p\        P                  ! \        RR7      ;_uu_ 4        \        P
                  ! W R7       RRR4       R#   + '       g   i     R# ; i)z1 2 3
4 5 6r  rt   )rA   N)r   rz   r  r  r   r   )rA   r   r'   s   &  r   test_warn_on_skipped_datar    s>    D
4.C	k)B	C	C


3* 
D	C	C	Cs   AA%	r   clongdoubleswapc                 Z   \         P                  ! V 4      p R V R2.pV'       d   V P                  4       p \         P                  ! RRV 3.RR7      pVP                  R,          ^,          ^8X  g   Q h\         P                  ! W4R^R7      pVR,          V P                  V4      8X  g   Q hR# )	zx,r   rH   Frj   r	   r   N)r(   S1)r   r/   newbyteorderfieldsr   r   )r/   r   r  r   full_dtr   s   &&&   r   test_byteswapping_and_unalignedr    s    $ HHUOErND""$hhc5\2%@G>>#q!Q&&&
**TC!Cs8uzz%((((r   efdFD?c                     \        R 4      p\        P                  ! WRRR7      p\        V\        P                  ! ^^.4      P                  V 4      4       R# )u    3 ," 2
"r	   rb  rX  N)r   r   r   r   r   astyper   s   &  r   !test_unicode_whitespace_strippingr    sC     $
%C
**S
DCsBHHaV,33E:;r   FDc                     R pWP                  RR4      .p\        P                  ! W RR7      p\        V\        P                  ! . RO.^,          4      4       R# )z0 1 , 2+3j , ( 4+5j ), ( 6+-7j )  , 8j , ( 9j ) 
r0  u    r	   r`   N)rQ   y       @      @y      @      @y      @      y               @y              "@)r%   r   r   r   r   )r/   liner   r   s   &   r   )test_unicode_whitespace_stripping_complexr    sH     ?D,,sH-.D
**T#
6CsBHH&I%JQ%NOPr   r   c                     \         P                  ! \        4      ;_uu_ 4        \        P                  ! VR ,           .V RR7       RRR4       R#   + '       g   i     R# ; i)r   r	   r`   Nry   )r/   r   s   &&r   test_bad_complexr    s8     
z	"	"


EDL>#> 
#	"	"	"s   "AA 	efgdFDGc           	         V P                  4       R 8X  d   \        P                  ! R4       \        P                  ! \        4      ;_uu_ 4        \
        P                  ! R.V RRR7       RRR4       R#   + '       g   i     R# ; i)gz0longdouble/clongdouble assignment may misbehave.1 r	   rb  rX  N)lowerrz   xfailr{   r|   r   r   r.   s   &r   test_nul_character_errorr    sQ    
 {{}GH	z	"	"


G9ESCH 
#	"	"	"s   A44B	c                    V R 8X  d   \         P                  ! R4       V R9   d   \         P                  ! R4       \        R4      \	        R4      u;8X  d   \        R4      u;8X  d	   ^8X  g   Q h Q h\         P                  ! \        4      ;_uu_ 4        \        P                  ! R.V R7       RRR4       R#   + '       g   i     R# ; i)ez5half assignment currently uses Python float convertereGz2clongdouble assignment is buggy (uses `complex`?).1_1z1_1
r.   N)
rz   skipr  re   rd   complexr{   r|   r   r   r.   s   &r   test_no_thousands_supportr    s     |KL}IJu:u==2=====	z	"	"


G9E* 
#	"	"	"s   B88C		z1,2
z2
,3
z2,3
c                     R p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! V RR7       RRR4       R#   + '       g   i     R# ; i)z7Found an unquoted embedded newline within a single linert   r	   r
   Nry   )r   r   s   & r   test_bad_newline_in_iteratorr    s8     DC	z	-	-


43' 
.	-	-	-s   A

A	z2,3
z'2
',3
z'2',3
z'2
',3
c                 \    \         P                  ! V R RR7      p\        VRR.RR..4       R# )r	   rn  rh  ra   rb   r   N)r   r   r   )r   r   s   & r   test_good_newline_in_iteratorr    s-     **TSC
8Csb"XBx01r   newlinec                     . R
OpV Uu. uF  q"P                  RV 4      NK  	  pp\        P                  ! V\        RRR7      p\	        VRRV  2.RRV  R2..4       R	# u upi )1,"2
"
r   r	   rb  rX  rv  23rw  N)r  z3,"4
z1"
)r%   r   r   rA  r   )r  r   r   r   s   &   r   test_universal_newlines_quotedr  
  sf    
 +D267$3KKg&$D7
**T3#
FCscQwi=1C1WIQ3HIJ 8s   Ac                      \         P                  ! R R.RR7      p \        V . R	O. R
O.4       \         P                  ! RR.R\        R7      p V P	                  4       . RO. RO.8X  g   Q hR# )z1 2 3
z4 5 6 r
   z1 ,2 ,3
z4 ,5 ,6r	   rM   NrQ   r   rS   )rl   rm   r   )r  z2 r  )z4 z5 6)r   r   r   rA  tolist)r   s    r   test_null_characterr    s^    
**o}5
HCsY	23 **'9"&2C::<35LMMMMr   c                       ! R  R4      p \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! V ! 4       \
        RR7       RRR4       R#   + '       g   i     R# ; i)c                   ,   a  ] tR tRt o R tR tRtV tR# ):test_iterator_fails_getting_next_line.<locals>.BadSequencei!  c                    ^d# )d   r   selfs   &r   __len__Btest_iterator_fails_getting_next_line.<locals>.BadSequence.__len__"  s    r   c                B    V^28X  d   \        R4      hV RV^,            2# )2   Bad things happened!z, )RuntimeError)r  items   &&r   __getitem__Ftest_iterator_fails_getting_next_line.<locals>.BadSequence.__getitem__%  s*    rz"#9::V2dQhZ((r   r   N)__name__
__module____qualname____firstlineno__r  r  __static_attributes____classdictcell____classdict__s   @r   BadSequencer  !  s     		) 	)r   r  r  rt   r	   r`   N)rz   r{   r  r   r   re   )r  s    r   %test_iterator_fails_getting_next_liner     sB    ) ) 
|+A	B	B


;=s; 
C	B	B	Bs   #AA-	c                      a  ] tR tRt o R tR tR tR tR tR t	]
P                  P                  R. RO4      R	 4       tR
tV tR# )TestCReaderUnitTestsi.  c                   \         P                  ! \        R R7      ;_uu_ 4        \        P                  P
                  P                  \        4       \        P                  ! R4      RR7       RRR4       R#   + '       g   i     R# ; i)z.*readrt   r)  Tr/   filelikeN)	rz   r{   AttributeErrorr   _core_multiarray_umath_load_from_filelikerA  r/   r  s   &r   test_not_an_filelike)TestCReaderUnitTests.test_not_an_filelike1  sP    ]]>::HH&&:: ; > ;:::   A	A88B		c                &    ! R  R4      p\         P                  ! \        RR7      ;_uu_ 4        \        P                  P
                  P                  V! 4       \        P                  ! R4      RR7       RRR4       R#   + '       g   i     R# ; i)c                   *   a  ] tR tRt o ^ tR tRtV tR# )BTestCReaderUnitTests.test_filelike_read_fails.<locals>.BadFileLikei:  c                p    V ;P                   ^,          un         V P                   ^8  d   \        R4      hR# )rQ   Bad bad bad!z1,2,3
)counterr  r  sizes   &&r   readGTestCReaderUnitTests.test_filelike_read_fails.<locals>.BadFileLike.read=  s*    !<<"$&~66 r   r   Nr  r  r  r  r  r  r  r  r  s   @r   BadFileLiker  :  s     G! !r   r  r  rt   r)  Tr  N)rz   r{   r  r   r  r  r  r/   r  r  s   & r   test_filelike_read_fails-TestCReaderUnitTests.test_filelike_read_fails6  s]    	! 	! ]]<~>>HH&&::RXXc]T ; C ?>>>   AA??B	c                &    ! R  R4      p\         P                  ! \        RR7      ;_uu_ 4        \        P                  P
                  P                  V! 4       \        P                  ! R4      RR7       RRR4       R#   + '       g   i     R# ; i)c                   *   a  ] tR tRt o ^ tR tRtV tR# )@TestCReaderUnitTests.test_filelike_bad_read.<locals>.BadFileLikeiL  c                    R # )i  r   r  s   &&r   r  ETestCReaderUnitTests.test_filelike_bad_read.<locals>.BadFileLike.readO  s    r   r   Nr  r  s   @r   r  r  L  s     G r   r  r7  rt   r)  Tr  N)rz   r{   r   r   r  r  r  r/   r  s   & r   test_filelike_bad_read+TestCReaderUnitTests.test_filelike_bad_readG  sn    
	 	 ]]9BD DHH&&::RXXc]T ; CD D D Dr  c                   \         P                  ! \        R R7      ;_uu_ 4        \        P                  P
                  P                  \        4       \        P                  ! R4      RR7       RRR4       R#   + '       g   i     R# ; i)z/error reading from object, expected an iterablert   r)  Fr  N	rz   r{   r   r   r  r  r  rA  r/   r  s   &r   test_not_an_iter%TestCReaderUnitTests.test_not_an_iterW  sa    ]]9KM MHH&&:: ; ?M M M Mr  c                    \         P                  ! \        R R7      ;_uu_ 4        \        P                  P
                  P                  \        4       RRR7       RRR4       R#   + '       g   i     R# ; i)zinternal error: dtype mustrt   r)  Fr  N)rz   r{   r   r   r  r  r  rA  r  s   &r   test_bad_type"TestCReaderUnitTests.test_bad_type]  sJ    ]]9,HIIHH&&::e ; 5 JIIIs   5A$$A5	c           	        \         P                  ! \        R R7      ;_uu_ 4        \        P                  P
                  P                  \        4       \        P                  ! R4      R^{R7       RRR4       R#   + '       g   i     R# ; i)zencoding must be a unicodert   r)  F)r/   r  r   Nr  r  s   &r   test_bad_encoding&TestCReaderUnitTests.test_bad_encodingb  sU    ]]9,HIIHH&&:: ; M JIIIs   A
A99B
	r  c           	         \        R P                  RV4      RR7      p\        P                  P                  P                  V\        P                  ! R4      RRR^R7      p\        VR,          R	R
V 2RR.4       R# )z0
1
"2
"
3
4 #
r   r!  )r  U10Trb  r   )r/   r  quoter   	skiplinesrv  r  r  z4 N:NNNr   )r   r%   r   r  r  r  r/   r   )r  r  r   r   s   &&  r   test_manual_universal_newlines3TestCReaderUnitTests.test_manual_universal_newlinesg  sw     /77gF "$ hh((<<$sa = 1 	3t9sayM3&EFr   r   N)r   
)r  r  r  r  r  r  r  r  r  r  rz   markparametrizer  r  r  r  s   @r   r  r  .  sN     >
C"C ?5
M
 [[Y(<=G >Gr   r  c                      \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        R4      RRR7       RRR4       R#   + '       g   i     R# ; i)".*control characters.*incompatiblert   1, 2, 3r	   r   NrJ  r   r   r   'test_delimiter_comment_collision_raisesr  w  s9    	y(L	M	M


8I&#D 
N	M	M	M   #AA#	c                      \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        R4      RRR7       RRR4       R#   + '       g   i     R# ; i)r  rt   r  r	   rh  NrJ  r   r   r   )test_delimiter_quotechar_collision_raisesr  |  s9    	y(L	M	M


8I&#E 
N	M	M	Mr  c                      \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        R4      RRR7       RRR4       R#   + '       g   i     R# ; i)r  rt   1 2 3r   )r   rY  NrJ  r   r   r   'test_comment_quotechar_collision_raisesr    s9    	y(L	M	M


8G$scB 
N	M	M	Mr  c                      \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        R4      RRR.R7       RRR4       R#   + '       g   i     R# ; i)z0Comment characters.*cannot include the delimiterrt   r  r	   r   r   NrJ  r   r   r   5test_delimiter_and_multiple_comments_collision_raisesr    sI    	K
 
 	

8I&#c
K
 
 
 
s   %AA%	c                    \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        RV  RV  RV  RV  R2	4      V R7       RRR4       \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        RV  RV  RV  RV  R2	4      V R	7       RRR4       R#   + '       g   i     Lm; i  + '       g   i     R# ; i)
r  rt   rv  r  z3
45z6
r   NrY  rJ  )r   s   &r   ,test_collision_with_default_delimiter_raisesr    s     
y(L	M	M


8at1RDRD"S9:RH 
N	y(L	M	M


8at1RDRD"S9:bI 
N	M 
N	M	M	M	Ms   /B9 /C9C		C	nlc                 X   \        R V  RV  RV  V  RV  RV  RV  V  24      pRp\        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! WR7       R	R	R	4       \        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! WR
7       R	R	R	4       \        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! WR7       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     Li; i  + '       g   i     R	# ; i)rv  r  r  rw  r  r  z&control character.*cannot be a newlinert   r
   Nr  r  ri  )r  r'   r   s   &  r   %test_control_character_newline_raisesr!    s    
Qrd!B4qRD"Qrd!B4t<
=C
2C	y	,	,


3% 
-	y	,	,


3$ 
-	y	,	,


3% 
-	,	 
-	,	,	,	,	,	,s$   C2DD2D	D	D)	nrowsc           	     J   V .V,          V.,           p\         P                  ! WSR7      p\        V4      V^,           8X  g   Q h\        V4      \        V4      8X  g   Q h\        RP	                  V4      4      p\         P
                  ! WrR7      p\        V4      \        V4      8X  g   Q hVP                  VP                  8X  g   Q h\        W4       \        4       w  r\        P                  ! V	4       \        V
R4      ;_uu_ 4       pVP                  RP	                  V4      R,           4       RRR4       \         P
                  ! WR7      p\        V4      \        V4      8X  g   Q hVP                  VP                  8X  g   Q h\        W4       \         P
                  ! W\        V^,          4      R7      p\        P                  ! V
4       \        V4      \        V^,          4      8X  g   Q h\        WR\        V^,          4       4       R#   + '       g   i     L; i)z|Check that the correct unit (e.g. month, day, second) is discovered from
the data when a user specifies a unitless datetime.r.   r   r  N)r/   r   )r   r   lenr   r  r   r/   r   r   oscloseopenr  re   remove)generic_data
long_datumunitless_dtyper
  r"  r   r   r'   r(   fdfnamer  s   &&&&&       r   test_parametric_unit_discoveryr.    s    >E!ZL0Dxx3Ht9	!!!t9H%%% 499T?
#C


3-Aq6S]"""77hnn$$$ 	IBHHRL	eS		R
44'( 
 	

5/Aq6S]"""77hnn$$$


5UQYHAIIeq6S^###_c%!)n-. 
	s   (HH"	c                     R .R,          R.,           p \         P                  ! R .R,          R.,           RR7      pR p\        RP                  V 4      4      p\         P                  ! VRVR	7      pVP
                  VP
                  8X  g   Q h\        WA4       \        4       w  rV\        P                  ! V4       \        VR
4      ;_uu_ 4       pVP                  RP                  V 4      4       RRR4       \         P                  ! VRVR	7      p\        P                  ! V4       VP
                  VP
                  8X  g   Q h\        WA4       R#   + '       g   i     Li; i)
spam-a-lot`  XXXtis_but_a_scratchtis_but_a_scratchU17r.   c                 $    V P                  R 4      # r   )removeprefixr   s   &r   r   >test_str_dtype_unit_discovery_with_converter.<locals>.<lambda>  s    Q^^E*r   r   r  r@  r  N)r   r   r   r  r   r/   r   r   r%  r&  r'  r  r(  )r   r   r   r'   r(   r,  r-  r  s           r   ,test_str_dtype_unit_discovery_with_converterr8    s   >E!%;$<<Dxx	"5!66eH +D 499T?
#C


3cd3A77hnn$$$ 	IBHHRL	eS		R
4! 



55AIIe77hnn$$$ 
	s   !EE!	c                     \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        R4      RR7       RRR4       \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \        R4      RR7       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! \        R4      RR7       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! \        R4      R	R.R7       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)
z#Text reading control character mustrt   r  r!  r
   Nr  z"comments cannot be an empty stringr  r   )rz   r{   r   r   r   r   r|   r   r   r   test_control_character_emptyr:    s    	y(M	N	N


8G$3 
O	y(M	N	N


8G$3 
O	z)M	N	N


8G$r2 
O	z)M	N	N


8G$Ry9 
O	N 
O	N	N	N	N	N	N	N	Ns/   "D=3"E"E#$E6=E	E 	#E3	6F	c                 f    \         P                  ! \        R4      RRR7      p \        V . RO4       R# )z<Byte control characters (comments, delimiter) are supported.z#header
1,2,3   #   ,)r   r   Nr  )r   r   r   r   )r(   s    r    test_control_characters_as_bytesr>    s$    


8,-MAIr   zignore::UserWarningc                  
   \         P                  ! R .R\        R7      p \        V 4      ^ 8X  g   Q h\	        ^R4       FB  p\         P                  ! RV,          .R\        ^
R7      p \        V 4      V^,           8X  d   KB  Q h	  R# )r!  r	   rM   i   )r   r/   r   N)r   r   r   r$  r'  )r   r)  s     r   test_field_growing_casesr@    sh     **bTS
6Cs8q==1d^jj#'cL3x1q5    r   nmaxc                 "   R pR.V,          p\        RP                  V4      4      p\        P                  ! V\        RV R7      p\        V4      V 8X  g   Q h\        4       w  rV\        P                  ! V4       \        VR4      ;_uu_ 4       pVP                  RP                  V4      4       RRR4       \        P                  ! V\        RV R7      p\        P                  ! V4       \        V4      V 8X  g   Q hR#   + '       g   i     LX; i)r1  za 0.5 1r   r0  r   r  N)r   r  r   r   strr$  r   r%  r&  r'  r  r(  )rA  file_lengthr   r'   r   r,  r-  r  s   &       r    test_maxrows_exceeding_chunksizerE  	  s     K ;$D
499T?
#C
**SsT
BCs8t 	IBHHRL	eS		R
4! 

**U#t
DCIIes8t	 
	s   !C>>D	nskipc                 Z   R pRP                  R \        ^V^,           4       4       4      p\        RW!,
          4      p\        P                  ! V^,           V^,           V,           4      P                  \        4      p\        V4      p\        P                  ! VRRVRR7      p\        V4      V8X  g   Q h\        WWR	,          4       V R,          pVP                  V4       \        V4      p	\        P                  ! V	RRVRR7      p\        V4      V8X  g   Q h\        WWR	,          4       R# )
i r   c              3   *   "   T F	  q R 2x  K  	  R# 5i)z a 0.5 1Nr   ).0r)  s   & r   	<genexpr>Etest_skiprow_exceeding_maxrows_exceeding_chunksize.<locals>.<genexpr>#  s     G-Fs(^-Fs   r1  rC  r0  )r/   r   rA   r   ztest_data.txtNr  )r  r'  minr   aranger  rC  r   r   r$  r   r  )
tmpdirrF  rD  r   expected_lengthr   r'   r   tmp_filer-  s
   &&        r   2test_skiprow_exceeding_maxrows_exceeding_chunksizerQ    s     K99GU1kAo-FGGD%!45OyyEAI$?@GGLH 4.C
**Suu
UCs8&&&xT+ 'HNN4ME
**U%3QV
WCs8&&&xT+r   )z..z//z@-zthis is a comment:)r   rQ   r   rS   )rA   r   )z
1 2 3 4 5
)rQ   rm   )z
1
2
3
4
5
)rm   rQ   )r<   rS   Nzplate of shrimp)r0  	u        u   　)r(   u   のu   🫕)r	  r
  )FT)rS   rx   )rb  rn  `)r!  z


z# 1 2 3
# 4 5 6
)r   rQ   r   r  rR   )r   rQ   )u2rQ   )i4 )u4rW  )i8   
 )u8rZ  )float16g#{ ?)r   g. 7)	complex64y. 7`F$:)r>   g)
complex128ywfUD3":)
longdoublerZ  yp`P@0 B B)U2u   𐈃򠬌)z1 +2jz1+ 2jz1+2 jz1+-+3z(1jz(1z(1+2jz1+2j))r   r
  r  )r   r
  )r)  r*  r+  r
  )z2012-03z
2013-01-15M8zM8[D])r0  r3  r  r4  )rn   r   r1  )r?  r   i  r1  )r   r?  i90  r   i3	 i )j__doc__r%  rB  ior   tempfiler   r   rz   numpyr   numpy.ma.testutilsr   numpy.testingr   r   r   r  r  r)   r@   rE   rK   rX   rZ   rh   rq   r~   r   r   r   r   r   rd   rA  r   r/   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  	typecodesfilterwarningsr  r  r]  r^  r#  r-  r2  r8  skipifrD  rF  rK  rM  rP  rR  r^  r`  re  rj  ro  rq  ry  r{  r~  r  r  reprr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r.  r8  r:  r>  r@  rE  rQ  r   r   r   <module>rl     s   
 
  0   + :B  $LM: N:!@ \2/ 3/*O@LL ":;- <- ":;. <.
 #NN #CD, E,
 		  5&/2O 3O 288D>288D>"BC4 D4 0&(E% 3434  5 5    $7 ),. -. %	bhhtn	bhhtn,, &= ",,|"<=NO4 P >4 ",,|"<=NO4 P >4
 2<<"?@6	  7 A	   7 $-EF* G*&% !eWb!12: 3:K 08 18< o.
& /
& o.
& /
&&"7( &:    !EF),T9$56+ 7 - G+* V,+ -+ '7+."$>!K+F 	)	GHI&.( ) $/) 0) ) 
\"W,s24<4< $'Q (Q $'KM?M (?
 LL&2S8:I:I 
\"Y.46+6+ ii" (( ikkm	" 22 $89K :KN<FG FGRE
F
C
L 	J	J |,& -& F07 "45 / 6 /F0: 12! 3! !=> ?( "IJ, K,r   