+
    &i+                        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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$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      ]P$                  P'                  R]
PP                  ! R4      ]
PP                  ! R 4      34      R! 4       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* t0R+ t1R, t2R- t3]P$                  P'                  RR.4      R/ 4       t4]P$                  P'                  RR0]
PP                  ! R14      3R2]
PP                  ! R34      3.4      R4 4       t5R5 t6R6 t7]P$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      ]P$                  P'                  R]
Pp                  R7,          4      ]P$                  Ps                  R84      R9 4       4       4       t:]P$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      ]P$                  P'                  R]
Pp                  R7,          4      ]P$                  Ps                  R84      R: 4       4       4       t;]P$                  P'                  R]
Px                  ]
Pz                  34      ]P$                  P'                  R;R4      R> 4       4       t>R? t?R@ t@RA tA]P$                  PK                  ]'       * RBR7      RC 4       tB]P$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      RD 4       tC]P$                  P'                  RE^ ]".RF34      RG 4       tD]P$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      RH 4       tE]P$                  P'                  RIR4      RJ 4       tFRK tG]P$                  P'                  RLR4      RM 4       tH]P$                  P'                  RLR4      RN 4       tIRO tJ]P$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      RP 4       tKRQ tLRR tMRS tNRT tORU tP]P$                  P'                  RVR4      ]P$                  P'                  RWR4      ]P$                  P'                  RXRR.4      RY 4       4       4       tQ]P$                  P'                  R
R4      RZ 4       tR]P$                  P'                  RR[.RRRRRRRRRRR\]S! R4      3RR]]S! R4      3R.4      ]P$                  P'                  R^R=R<.4      R_ 4       4       tT]P$                  P'                  R]
Pp                  R7,          R`,           Ra,           4      Rb 4       tU]P$                  P'                  RRc4      Rd 4       tV]P$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      ]P$                  P'                  RRc4      ]P$                  P'                  Re. RO4      Rf 4       4       4       tW]P$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      ]P$                  P'                  R]
Pp                  R7,          Rg,           Ra,           4      Rh 4       4       tX]P$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      ]P$                  P'                  R]
Pp                  R7,          Rg,           Ra,           4      Ri 4       4       tY]P$                  P'                  RVRjRk.RjRl..4      Rm 4       tZ]P$                  P'                  RVRjRn.RjRo.RjRp.RjRq..4      Rr 4       t[]P$                  P'                  Rs. RO4      Rt 4       t\Ru t]Rv t^ ! Rw Rx4      t_Ry t`Rz taR{ tbR| tc]P$                  P'                  RR4      R} 4       td]P$                  P'                  R~R4      R 4       te]P$                  P'                  RRR.4      ]P$                  P'                  RR4      R 4       4       tfR tg]P$                  PK                  ];'       d    ]PL                  PN                  R8*  RR7      R 4       thR ti]P$                  Ps                  R4      R 4       tj]P$                  P'                  RR4      R 4       tk]P$                  P'                  RR4      R 4       tlR# )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IS_PYPY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     Z/var/www/html/photoedit/myenv/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   r0   uint16float64int8r   )r   r0   r   s      r   mixed_types_structuredrA   +   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# );)r0   r   rB   NrA   r   r   r   )rB   r   r0   r   r)   s   &    r   1test_structured_dtype_and_skiprows_no_empty_linesrF   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# )rD   T)r0   r   unpackr,   r-   r2   r.   NrE   )r   r0   r   r)   bcds          r   test_unpack_structuredrL   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   r0   N)r)   u1r   )rI   rO   r   r      r      ))r      )   r   r   r0   r   r   r   r   r0   r   r   s      r    test_structured_dtype_with_shaperY   \   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)   rO   )r   r   )rP   rW   rX   s      r   &test_structured_dtype_with_multi_shaper[   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
   r0   r   N)r   )      ?       @)r   r#   )      @r%   )g      @g       @)r   r0   floatintr   r   r   r   )pointdtr   r   s       r   test_nested_structured_subarrayri   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
   rN   N)rR   r   rT         r   )rU   rV   r   
         rW   )rh   r   r   s      r   test_structured_dtype_offsetsrr   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   rs   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 integerru   rb   Nrw   r{   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# )rR   r/   )r0   ndminN)rR   r   rT   rm   rn   )r   r   reshaper   r   r   rf   )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 keywordru   rx   )r   Nrz   )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   r0   r   r    rR   r      rm   rn   <   rU   rV   Z   rT   r   rR   r   r   r   r   r   rf   )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   r0   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
   r0   r   max_rowsz1.5z2.5z3.0z4.0r/   N)r   r   r   r   r0   r   r0   r(   ress   &  r   test_maxrows_no_blank_linesr      sO    
.
/C
**Sq
ACE"bhh?uMNr   zPyPy bug in error formatting)reason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 2ru   r
   ra   Nr   r{   r|   r}   r   r   )r0   r(   msgs   &  r   !test_exception_message_bad_valuesr      sL     $
%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   nanre   ss   &r   <lambda>2test_converters_negative_indices.<locals>.<lambda>       AJ"&&<E!H<r   r!   r"   r   r$   r%   r
   r0   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
   )r0   r   r   usecolsz0,1,2
0,1,2,3,4c                     R# )rR   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 3ru   r
   r   N)r   r   z4,3,2,1rz   )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
   r0   r   r   z0,0,XXX
0
0,XXX,XXX,0,XXX
z/invalid column index -2 at row 2 with 1 columnsru   N)	r   r   r   r   re   r   r{   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)rT   )r   r   r   r0   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
   ra   z,c,1.0ze,r/   N)r   r   r   r0   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r0   r   r   encodingCATdogu   ΑΒΓu   δεζABCdef)r   r   r   r0   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      # )ro   )rf   re   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   r0   int32float32r   r   r   )r(   rh   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   r0   r   r   r   s       r   !test_converter_with_unicode_dtyper   6  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
   rN   r!   r"   r=   )r   r   )r   r   r   re   r   tile)rowr(   r   s      r   test_read_huge_rowr   H  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   r0   r   type)r0   fieldvalues   &  r   test_huge_floatr  P  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
   ra   AAAz5-1BBBBBz0-3Cz4-9r/   N)r   r   r   r   r   r0   )given_dtypeexpected_dtyper(   r   r   s   &&   r   test_string_no_length_givenr  Y  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   re   r   )stringsr(   r   r   r   s        r   test_float_conversionr  o  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
   ra   TFN)r   r   r   boolr0   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   r0   r   kindr{   r|   r}   )r0   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
   ra   Nr   )r0   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
   ra   r/   N)y      ?      g      @y      @      )r#   y            r   )r&   r   r   r   r   r   )r0   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)rm   r
   Nrangeis    r   gen%test_read_from_generator.<locals>.gen  s2     qACqQqA'' s   /1r
   ra   N)r   r   r   )rR   r   rR   )r   rm   rm   )rT   r   r   )r   r   rf   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)rT    Nr(  r*  s    r   r,  /test_read_from_generator_multitype.<locals>.gen  s'     qACqQ.  s   %'zi, dr2  ra   r/   N))r   g        )rR   g      ?)r   r   )r   r   r   r   r.  s      r   "test_read_from_generator_multityper4    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)r7  s   3, 5i1  r   r   r   r   r,  )test_read_from_bad_generator.<locals>.gen  s     ***s   &non-string returned while reading dataru   zi, ir
   ra   Nr   )r,  s    r   test_read_from_bad_generatorr:    sM    + 
F
H 
H


35#6
H 
H 
H 
Hs   AA"	zPython lacks refcountsc                  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 1ru   r0   r   N)	objectr   r{   r|   r}   r   r   sysgetrefcount)r   r(   r=  r>  s     @@r   !test_object_cleanup_on_read_errorrE    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_compatiblerG    s9     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.ru   1 2
3 4r   Nr{   r|   r   r   r   r   )r   r   s   & r   test_invalid_converterrL    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 dictru   rI  r)   rJ  N)r   r   )r{   r|   r   r   r   r   rf   r   r   r   +test_converters_dict_raises_non_integer_keyrN    s{     
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)rI  zconverter specified for columnru   rJ  N)r   r{   r|   r}   r   r   rf   )rO  r   s   & r   'test_converters_dict_raises_non_col_keyrQ    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 callableru   rI  rJ  NrK  r   r   r   ,test_converters_dict_raises_val_not_callablerS  	  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
   r0   r   	quotecharNr,   r   )rV  r"   )rW  g      @)rX  rd   r   r   r0   r?   r   r   r   rT  r(   r0   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# )rV  z	     2.5
rW  z 4.5
rX  z   5.0
r-   r/   NrY  r[  r\  r]  r^  s   &    r   *test_quoted_field_with_whitepace_delimiterra    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-   r2   z.the dtype passed requires 3 columns but 4 wereru   r
   ra   Nr/   "rY  )r,   U24)zlat,longg     F@g      >@)r   r   r0   r?   r{   r|   r}   r   seekr   r   )r(   r0   r   r   s       r   test_quote_support_defaultrf  +  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 Noneru   r
   z''r   rZ  Nr   r{   r|   r   r   r   )r(   r   s     r   test_quotechar_multichar_errorrk  <  sC     :
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)rh  zWwhen multiple comments or a multi-character comment is given, quotes are not supported.ru   r
   123rc  )r   r    rZ  Nr   %')r   )r   r{   r|   r}   r   r   r   )r(   r   r   s      r   'test_comment_multichar_error_with_quoterp  E  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/   rD   ro  rY  Nr1   r4   )	r   r   r0   r>   r?   r@   r   r   r   )r   r0   r   r   s       r   !test_structured_dtype_with_quotesrr  U  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
   rc  r   r0   rZ  N14r#  r   r   r   r   r   r   s      r   test_quoted_field_is_not_emptyrz  r  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"
"rt  r/   r
   rc  ru  Nrv  ry  r   s      r   (test_quoted_field_is_not_empty_nonstrictr|  x  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
   rc  rY  Nry  r   s      r   "test_consecutive_quotechar_escapedr    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 dataru   )r   r   w)mode)r   rT   rQ   )r   )
r   r{   warnsUserWarningr   r   r   r   writere  )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  ru   )rB   N)r   r{   r  r  r   r   )rB   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  
complex128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   rI   Frk   r
   r   N)r)   S1)r   r0   newbyteorderfieldsr   r   )r0   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
   rc  rY  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 ) 
r2  u    r
   ra   N)rR   y       @      @y      @      @y      @      y               @y              "@)r&   r   r   r   r   )r0   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
   ra   Nrz   )r0   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
   rc  rY  N)lowerr{   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)
r{   skipr  rf   re   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 lineru   r
   r   Nrz   )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
   ro  ri  rb   rc   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
   rc  rY  rw  23rx  N)r  z3,"4
z1"
)r&   r   r   rB  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
   rN   NrR   r   rT   )rm   rn   r   )r  z2 r  )z4 z5 6)r   r   r   rB  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>.BadSequencei5  c                    ^d# )d   r   selfs   &r   __len__Btest_iterator_fails_getting_next_line.<locals>.BadSequence.__len__6  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__9  s*    rz"#9::V2dQhZ((r   r   N)__name__
__module____qualname____firstlineno__r  r  __static_attributes____classdictcell____classdict__s   @r   BadSequencer  5  s     		) 	)r   r  r  ru   r
   ra   N)r{   r|   r  r   r   rf   )r  s    r   %test_iterator_fails_getting_next_liner  4  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# )TestCReaderUnitTestsiB  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.*readru   r+  Tr0   filelikeN)	r{   r|   AttributeErrorr   _core_multiarray_umath_load_from_filelikerB  r0   r  s   &r   test_not_an_filelike)TestCReaderUnitTests.test_not_an_filelikeE  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>.BadFileLikeiN  c                p    V ;P                   ^,          un         V P                   ^8  d   \        R4      hR# )rR   Bad bad bad!z1,2,3
)counterr  r  sizes   &&r   readGTestCReaderUnitTests.test_filelike_read_fails.<locals>.BadFileLike.readQ  s*    !<<"$&~66 r   r   Nr  r  r  r  r  r  r  r  r  s   @r   BadFileLiker  N  s     G! !r   r  r  ru   r+  Tr  N)r{   r|   r  r   r  r  r  r0   r  r  s   & r   test_filelike_read_fails-TestCReaderUnitTests.test_filelike_read_failsJ  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>.BadFileLikei`  c                    R # )i  r   r  s   &&r   r  ETestCReaderUnitTests.test_filelike_bad_read.<locals>.BadFileLike.readc  s    r   r   Nr  r  s   @r   r  r  `  s     G r   r  r9  ru   r+  Tr  N)r{   r|   r   r   r  r  r  r0   r  s   & r   test_filelike_bad_read+TestCReaderUnitTests.test_filelike_bad_read[  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 iterableru   r+  Fr  N	r{   r|   r   r   r  r  r  rB  r0   r  s   &r   test_not_an_iter%TestCReaderUnitTests.test_not_an_iterk  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 mustru   r+  Fr  N)r{   r|   r   r   r  r  r  rB  r  s   &r   test_bad_type"TestCReaderUnitTests.test_bad_typeq  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 unicoderu   r+  F)r0   r  r   Nr  r  s   &r   test_bad_encoding&TestCReaderUnitTests.test_bad_encodingv  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  U10Trc  r   )r0   r  quoter   	skiplinesrw  r  r  z4 N:NNNr   )r   r&   r   r  r  r  r0   r   )r  r  r   r   s   &&  r   test_manual_universal_newlines3TestCReaderUnitTests.test_manual_universal_newlines{  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  r{   markparametrizer
  r  r  r  s   @r   r  r  B  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.*incompatibleru   1, 2, 3r
   r   NrK  r   r   r   'test_delimiter_comment_collision_raisesr    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  ru   r  r
   ri  NrK  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  ru   1 2 3r   )r    rZ  NrK  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 delimiterru   r  r
   r   r   NrK  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  ru   rw  r  z3
45z6
r    NrZ  rK  )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)rw  r  r  rx  r  r  z&control character.*cannot be a newlineru   r   Nr  r  rj  )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)r0   r   )r   r   lenr   r  r   r0   r   r   oscloseopenr  rf   remove)generic_data
long_datumunitless_dtyper  r$  r   r   r(   r)   fdfnamer  s   &&&&&       r   test_parametric_unit_discoveryr0    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  rA  r  N)r   r   r   r  r   r0   r   r   r'  r(  r)  r  r*  )r   r   r   r(   r)   r.  r/  r  s           r   ,test_str_dtype_unit_discovery_with_converterr:    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 mustru   r  r#  r   Nr  z"comments cannot be an empty stringr  r   )r{   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
   rN   i   )r   r0   r   N)r   r   r   r&  r)  )r   r+  s     r   test_field_growing_casesrB    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)r3  za 0.5 1r   r2  r   r  N)r   r  r   r   strr&  r   r'  r(  r)  r  r*  )rC  file_lengthr   r(   r   r.  r/  r  s   &       r    test_maxrows_exceeding_chunksizerG    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>9  s     G-Fs(^-Fs   r3  rE  r2  )r0   r   rB   r   ztest_data.txtNr	  )r  r)  minr   aranger  rE  r   r   r&  r   r  )
tmpdirrH  rF  r   expected_lengthr   r(   r   tmp_filer/  s
   &&        r   2test_skiprow_exceeding_maxrows_exceeding_chunksizerS  4  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   rR   r   rT   )rB   r   )z
1 2 3 4 5
)rR   rn   )z
1
2
3
4
5
)rn   rR   )r=   rT   Nzplate of shrimp)r2  	u        u   　)rU   rT   rV   )r)   u   のu   🫕)r  r  )FT)rT   ry   )rc  ro  `)r#  z


z# 1 2 3
# 4 5 6
)r   rR   r   r  rS   )r   rR   )u2rR   )i4 )u4rY  )i8   
 )u8r\  )float16g#{ ?)r   g. 7)	complex64y. 7`F$:)r?   gywfUD3":)
longdoubler\  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])r2  r5  r  r6  )ro   r   r3  )r@  r   i  r3  )r   r@  i90  r   i3	 i )m__doc__r'  rC  ior   tempfiler   r   r{   numpyr   numpy.ma.testutilsr   numpy.testingr   r   r   r   r  r  r*   rA   rF   rL   rY   r[   ri   rr   r   r   r   r   r   r   re   rB  r   skipifimplementationversionr0   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  	typecodesfilterwarningsr  r  r_  r  r%  r/  r4  r:  rE  rG  rL  rN  rQ  rS  r_  ra  rf  rk  rp  rr  rz  r|  r  r  r  reprr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r#  r0  r:  r<  r@  rB  rG  rS  r   r   r   <module>ro     s6   
 
  0   + C CB  $LM: N:!@ \2/ 3/*O@LL ":;- <- ":;. <.
 #NN #CD, E,
 		  5&/2O 3O GGG 2 2 : :i G9  ;288D>288D>"BC4 D;4 0&(E% 3434  5 5    $7 ),. -. %	bhhtn	bhhtn,, &= GGG 2 2 : :i G9  ;",,|"<=NO4 P >;4 GGG 2 2 : :i G9  ;",,|"<=NO4 P >;4
 2<<"?@6	  7 A	   7 $-EF* G*& GGG 2 2 : :i G9  ;%;% !eWb!12: 3: GGG 2 2 : :i G9  ;K;K 08 18< o.
& /
& o.
& /
&&" GGG 2 2 : :i G9  ;7;7( &:    !EF),T9$56+ 7 - G+* V,+ -+ '7+."$>!K+ 
tJKL 	)	GHI&!.( )" $/) 0#)$) 
\"W,s24<4< $'Q (Q GGG 2 2 : :i G9  ;$'KM?M (;
?
 GGG 2 2 : :i G9  ;LL&2S8:I:;I GGG 2 2 : :i G9  ;
\"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 GGG 2 2 : :i G9  ;:;: 12! 3! !=> ?( "IJ, K,r   