
    Khi              	       d   S r SSKrSSKrSSKJr  \R                  R                  R                  r\R                  R                  r
/ SQr/ SQrSS jrS r " S S\R                  5      rS	 r\r   SS jrSSSSSS
SS\R(                  4	S jrS rS r  S\R0                  S.S jjrSS jrg)a,  :mod:`numpy.ma..mrecords`

Defines the equivalent of :class:`numpy.recarrays` for masked arrays,
where fields can be accessed as attributes.
Note that :class:`numpy.ma.MaskedArray` already supports structured datatypes
and the masking of individual fields.

.. moduleauthor:: Pierre Gerard-Marchant

    N)MaskedRecords	mrecarray
fromarraysfromrecordsfromtextfileaddfield)_data_mask
_fieldmaskdtypec                 \   [        U 5      n[        U5       Vs/ s H  nSU-  PM
     nnUc  UnOk[        U[        [        45      (       a  UnO6[        U[
        5      (       a  UR                  S5      nO[        SU< 35      e[        U5      nXb:  a  XTUS -  n/ n[        XTU R                  5       H\  u  pxn	U[        ;   a7  U	S   [        ;   a  UR                  XS   45        M4  UR                  U	5        MG  UR                  XyS   45        M^     [        R                  " U5      $ s  snf )z
Checks that field names ``descr`` are not reserved keywords.

If this is the case, a default 'f%i' is substituted.  If the argument
`names` is not None, updates the field names to valid names.

f%iN,zillegal input names r      )lenrange
isinstancetupleliststrsplit	NameErrorzipdescrreserved_fieldsappendnpr   )
r   namesndescridefault_names	new_namesnnamesndts
             C/var/www/html/env/lib/python3.13/site-packages/numpy/ma/mrecords.py_checknamesr(   $   s    ZF(-f61UQYM6}!	eeT]++Is##C(I25)<==Y?vw//IF5;;?	qt&qA$i(a MM1d)$ @ 88F- 7s   D)c                     U R                   R                   Vs/ s H  oS4PM     nn[        R                  " U R                  US9n[        S/[        U5      -  5      Ul        U$ s  snf )Nz|b1r   F)r   r   r   emptyshaper   r   flat)selfr$   mdescrfdmasks       r'   _get_fieldmaskr1   F   sY    "&**"2"23"2Q%j"2F3XXdjj/F#f+-.FKM 4s   A&c                       \ rS rSrSrSSSSSSSSS\R                  SSSS4S jrS r\	S	 5       r
\	S
 5       rS rS rS rS rS rS rS rSS jrS rS rS rSS jrS rS rS rSrg)r   M   aj  

Attributes
----------
_data : recarray
    Underlying data, as a record array.
_mask : boolean array
    Mask of the records. A record is masked when all its fields are
    masked.
_fieldmask : boolean recarray
    Record array of booleans, setting the mask of each individual field
    of each record.
_fill_value : record
    Filling values for each field.

Nr   FTc                    [         R                  R                  XX#UXVUXU
S9n[        R                  " UR
                  5      nU[        R                  L d  [         R                  " U5      (       d&  U(       d  [        S/[        U5      -  5      Ul
        U$ [         R                  " XS9nUR                  UR                  :w  a  UR                  UR                  nnUS:X  a"  [         R                  " UUR                  5      nOEUU:X  a"  [         R                  " UUR                  5      nOSn[        R                  " UUU4-  5      eU(       d  UR!                  U5        SUl        U$ UR
                  U:X  a  UnO<[         R                  " U Vs/ s H  n[        U/[        U5      -  5      PM     snUS9nUUl
        U$ s  snf )N)	r   bufoffsetstridesformatsr   titles	byteorderalignedF)copyr   z?Mask and data not compatible: data size is %i, mask size is %i.Tr*   )r   recarray__new__mamake_mask_descrr   nomasksizer   r   r
   arrayr,   resizereshapeMAError__setmask___sharedmask)clsr,   r   r5   r6   r7   r8   r   r9   r:   r;   mask	hard_mask
fill_value	keep_maskr<   optionsr.   mdtypendnmmsgr
   ms                           r'   r>   MaskedRecords.__new___   sy    {{""3UF+25*0+2 # 5
 ##DJJ/299BGGDMM"E7S[#89
. + 88D,DzzTZZ' IItyyR799T4::6D2X::dDJJ7D-C**SB8^44  &#'   ::' EHH%M1eQC#f+,=&>%M+13E"
 &Ns   "Gc                    [        USS 5      nUc  [        US[        R                  5      n[        R                  R                  U S5      nU[        R                  L a   [        R                  " U R                  US9nOo[        R                  " U5      n[        R                  " U Vs/ s H  n[        U/[        U5      -  5      PM     snUS9R                  [        R                  5      nU R                  nUR                  US9  U R!                  U5        US   [        R                  :X  a  [        R                  US'   g s  snf )Nr
   r   r*   r
   
_baseclass)getattrr?   rA   r   ndarray__getattribute__make_mask_noner,   r@   rC   r   r   viewr=   __dict__update_update_from)r.   objr
   objmask_dtyper/   rS   _dicts           r'   __array_finalize__ MaskedRecords.__array_finalize__   s   Wd+=c7BII6GZZ00w?F"))#))$**FC++F3G!LGq%c&k(9":G!L%+--1T"++->  5!#"**,"$++E, "Ms   )"Ec                 ^    [         R                  R                  U [         R                  5      $ )z"
Returns the data as a recarray.

)r   rY   r\   r=   r.   s    r'   r	   MaskedRecords._data   s     zztR[[11    c                     U R                   $ )z
Alias to mask.

rV   rg   s    r'   r   MaskedRecords._fieldmask   s     zzri   c                 x    U R                   (       a  [        U R                  5      $ [        U R                  5      $ )z
Returns the length

)ndimr   r	   r   rg   s    r'   __len__MaskedRecords.__len__   s'     99tzz?"4::ri   c                     [         R                  X5      $ ! [         a     Of = f[        R                  R                  U S5      R
                  n X!   S S nO'! [        [        4 a  n[        SU 35      UeS nAff = f[        R                  R                  U S5      n[        R                  R                  XS   5      nUR                  " U6 nUR                  R                  b  [        S5      eSnUR                  SS 5      n	U	bZ   X   n	O! [         a     Of = f[        U	R                  5      n
U	R                  [         U
(       a  U
4OS	45      R#                  5       nUR$                  (       d  U(       a}  UR                  [&        R(                  5      n[        R                  Ul        S
Ul        Xl        UR                  SS 5      nUb$   X   Ul        U$ ! [2         a    S Ul         U$ f = f U$ UR5                  5       nU$ )Nr      record array has no attribute r]   rW   z4MaskedRecords is currently limited tosimple records.Fr
    T_fill_value)objectrZ   AttributeErrorr   rY   fields	TypeErrorKeyErrorr\   getfieldr   r   NotImplementedErrorget
IndexErrorr   boolanyr,   r?   MaskedArrayrW   _isfieldr
   rt   
ValueErroritem)r.   attr	fielddictrese
_localdictr	   r`   	hasmaskedr
   tp_lenrt   s               r'   rZ   MaskedRecords.__getattribute__   s   	**466 		 JJ//g>EE		@/"1%C8$ 	@ 079>?@	@ ZZ00zB


&>?nnc"99??&% '8 9 9 	w-  %F

DF9B#HIMMOIII((2>>*CZZCNCLI$..=K&+&1&7CO
 
	 " +&*CO 
	+ ' 
 ((*C
sH    
$$A A>*A99A>D 
DD	G G43G4c                    US;   a  U R                  U5        g[        R                  U S5      nX;  n [        R                  XU5      n[        R
                  R                  U S5      R                  =(       d    0 nX;  a  U$ U(       a   [        R                  X5        O  Xa   SS nU[        R                  L a  US   n
U
b	  US   U   nOUnS	nO,[        R                  " U5      n[        R                  " U5      n[        R
                  R                  U S
5      R                   " U/UQ76 nUS   R#                  X5        U$ ! [         a    Us $ f = f! [         ak    [        R
                  R                  U S5      R                  =(       d    0 n[        R
                  R                  U S5      =(       d    0 nX;   d  X;   d  e  GN*f = f! [        [        4 a  n	[        SU 35      U	eSn	A	ff = f)z,
Sets the attribute attr to the value val.

)rJ   	fieldmaskNr]   r   _optinforq   rr   rt   Tr	   r
   )rG   ru   rZ   __setattr__r   rY   rw   __delattr__	Exceptionrx   ry   rv   r?   maskedfilledgetmaskarraysetfield__setitem__)r.   r   valr   newattrretr   optinfor   r   rt   dvalmvalr`   s                 r'   r   MaskedRecords.__setattr__   s    ((S!,,T:>
(	$$T5C 

33D'BIIORI$
&&t2	 	@/"1%C
 "))$]3K&!-06D99S>D??3'Djj))$8AA$MM7''3
+ ! J#  	

33D'BIIORIjj11$
CIrG%	, 8$ 	@ 079>?@	@s<   E E $G EEA1GGG5!G00G5c                    U R                   n[        R                  R                  U S5      n[        R                  R	                  XS   5      n[        U[        5      (       av  XA   R	                  [        R                  5      nX1   Ul	        SUl
        US   nUb	  Xa   Ul        UR                  (       d!  UR                  (       a  [        R                  $ U$ [        R                  " XA   5      R	                  [        5      n[        R                  " X1   5      R	                  [        R                   5      Ul	        U$ )zl
Returns all the fields sharing the same fieldname base.

The fieldname base is either `_data` or `_mask`.

r
   rW   Trt   )r]   r   rY   rZ   r\   r   r   r?   r   r
   rH   rt   rm   r   asarrayr   r=   )r.   indxr   r
   r	   r`   fvals          r'   __getitem__MaskedRecords.__getitem__  s     ]]


++D':

&>?dC  
 +""2>>2CCI"COm,D"&*88		yy J jj%**95JJu{+00=	
ri   c                     [         R                  R                  XU5        [        U[        5      (       a$  [         R
                  " U5      U R                  U'   gg)z"
Sets the given record to value.

N)r?   r   r   r   r   r   r
   )r.   r   values      r'   r   MaskedRecords.__setitem__=  sA    
 	""4u5dC  !u5DJJt !ri   c                    U R                   S:  a  [        U R                  R                   Vs/ s H  n[	        X5      PM     sn6  VVs/ s H2  nSSR                  U Vs/ s H  n[        U5      PM     sn5       S3PM4     nnnSSR                  U5       S3$ [        U R                  R                   Vs/ s H  n[	        X5      PM     sn5       VVs/ s H/  nSR                  U Vs/ s H  n[        U5      PM     sn5       PM1     nnnSSR                  U5       S3$ s  snf s  snf s  snnf s  snf s  snf s  snnf )z(
Calculates the string representation.

r   (r   )[z, ])rB   r   r   r   rX   joinr   )r.   fsr    mstrs        r'   __str__MaskedRecords.__str__F  s9   
 99q= TZZ=M=M"N=M74#3=M"NOQO !!4!Q#a&!!456a8O  Qtyy'q)) !DJJ<L<L!M<Lq'$"2<L!MNPN xx 3AQ 3456N  Ptyy'q)) #O "5 Q
 "N !4 Ps;   D%
D/ D*5D/8D5D?,D:D?*D/:D?c           	         U R                   R                  nS[        U Vs/ s H  n[        U5      PM     sn5      S-   4-  nU R                   R                   Vs/ s H  oCU[	        X5      4-  PM     nnUR                  SS5        UR                  USU R                  4-  S/5        [        SR                  U5      5      $ s  snf s  snf )z&
Calculates the repr representation.

z%%%is : %%s   r   zmasked_records(z    fill_valuez              )
)
r   r   maxr   rX   insertextendrL   r   r   )r.   _namesr$   fmtr   reprstrs         r'   __repr__MaskedRecords.__repr__T  s    
 !!sF#;FqCFF#;<q@BB8<

8H8HI8H1!WT-..8HIq+,/AA)+ 	,499W%&& $<Is   C
C	c                    UcC  Uc   [         R                  R                  U 5      nO[         R                  R                  X5      nOUc`   [        U[         R                  5      (       a   [         R                  R                  X5      nO@[         R                  R                  X5      nO [         R                  R                  XU5      n[        US[        R                  5      [        R                  Laj  [        R                  " UR
                  5      nU R                   R                  U[         R                  5      Ul        UR"                  UR                   l        U$ ! [         a    [         R
                  " U5      nUR                  cJ  U R                  R                  S   nU R                  5       R                  X5      nUR                  U 5        O[         R                  R                  X5      nSUl         GN8f = f)z#
Returns a view of the mrecarray.

Nr   r
   )r   rY   r\   
issubclassrx   r   rw   	__class__	__bases__	__array__r_   rt   rX   r?   rA   r@   r
   r,   )r.   r   typeoutputbasetyperO   s         r'   r\   MaskedRecords.viewa  s`    =|.4\*eRZZ00ZZ__T9FZZ__T9F ZZ__T$7FFGRYY/ryy@''5F::??62::>FL!'FLL'  * <<'#~~77:H!^^-225CF''-ZZ__T9F%)"*s   >E" 
E" "BHHc                     SU l         g)z
Forces the mask to hard.

TN	_hardmaskrg   s    r'   harden_maskMaskedRecords.harden_mask  s    
 ri   c                     SU l         g)z
Forces the mask to soft

FNr   rg   s    r'   soften_maskMaskedRecords.soften_mask  s    
 ri   c                     U R                   R                  5       R                  [        U 5      5      nU R                  R                  5       Ul        U$ )z'
Returns a copy of the masked record.

)r	   r<   r\   r   r
   )r.   copieds     r'   r<   MaskedRecords.copy  s:    
 "''T
3zz(ri   c                 4   Ub  U R                  U5      R                  5       $ [        R                  " U R                  5       R                  5       [        S9n[        R                  " U R
                  R                  5       5      nSX#'   UR                  5       $ )z
Return the data portion of the array as a list.

Data items are converted to the nearest compatible Python type.
Masked values are converted to fill_value. If fill_value is None,
the corresponding entries in the output list will be ``None``.

Nr*   )r   tolistr   rC   ru   r
   )r.   rL   resultrJ   s       r'   r   MaskedRecords.tolist  so     !;;z*1133$++-..0?xx

))+,}}ri   c                     SU R                   U R                  U R                  R                  U R                  R                  5       U R                  R                  5       U R                  4nU$ )zGReturn the internal state of the masked array.

This is for pickling.

r   )r,   r   flagsfncr	   tobytesr
   rt   )r.   states     r'   __getstate__MaskedRecords.__getstate__  sW     ##%##%!! ri   c                 L   Uu  p#pEpgn[         R                  R                  XXEU45        [         R                  " U R                  R                   V	V
s/ s H  u  pU	[         R
                  4PM     sn
n	5      nU R                  S   R                  X;XW45        Xl        gs  sn
n	f )a,  
Restore the internal state of the masked array.

This is for pickling.  ``state`` is typically the output of the
``__getstate__`` output, and is a 5-tuple:

- class name
- a tuple giving the shape of the data
- a typecode for the data
- a binary string for the data
- a binary string for the mask.

r
   N)r   rY   __setstate__r   r   r~   r]   rL   )r.   r   vershptypisfrawmskflvk_rO   s               r'   r   MaskedRecords.__setstate__  s     /4+3Ss


Cc&:;djj6F6FG6FFQArww<6FGHg++S#,CD Hs   B 
c                 `    [         U R                  U R                  SS4U R                  5       4$ )z/
Return a 3-tuple for pickling a MaskedArray.

)r   b)_mrreconstructr   rW   r   rg   s    r'   
__reduce__MaskedRecords.__reduce__  s1    
 $=!!#% 	%ri   )r   r
   rH   rL   )NNN)__name__
__module____qualname____firstlineno____doc__r?   rA   r>   rd   propertyr	   r   rn   rZ   r   r   r   r   r   r\   r   r   r<   r   r   r   r   __static_attributes__rs   ri   r'   r   r   M   s    " #'DDDYY%DD	&P( 2 2  	-^6p@6*'&P  (%ri   r   c                     [         R                  R                  XU5      R                  U 5      n[         R                  R                  [         R                  US5      nU R                  XXSS9$ )zC
Build a new MaskedArray from the information stored in a pickle.

b1)rJ   r   )r   rY   r>   r\   )subtype	baseclass	baseshaper   r	   r
   s         r'   r   r     sT    
 JJyX>CCGLEJJrzz9d;E??7?GGri   Fc	                    U  V	s/ s H  n	[         R                  " U	5      PM     n
n	U  V	s/ s H-  n	[        R                  " [         R                  " U	5      5      PM/     nn	[        R
                  R                  U
XUXEUUS9R                  [        5      n[        [        U6 5      UR                  l        Ub  Xl        U$ s  sn	f s  sn	f )a  
Creates a mrecarray from a (flat) list of masked arrays.

Parameters
----------
arraylist : sequence
    A list of (masked) arrays. Each element of the sequence is first converted
    to a masked array if needed. If a 2D array is passed as argument, it is
    processed line by line
dtype : {None, dtype}, optional
    Data type descriptor.
shape : {None, integer}, optional
    Number of records. If None, shape is defined from the shape of the
    first array in the list.
formats : {None, sequence}, optional
    Sequence of formats for each individual field. If None, the formats will
    be autodetected by inspecting the fields and selecting the highest dtype
    possible.
names : {None, sequence}, optional
    Sequence of the names of each field.
fill_value : {None, sequence}, optional
    Sequence of data to be used as filling values.

Notes
-----
Lists of tuples should be preferred over lists of lists for faster processing.

r   r,   r8   r   r9   r;   r:   )r?   getdatar   
atleast_1dr   recr   r\   r   r   r   r
   r-   rL   )	arraylistr   r,   r8   r   r9   r;   r:   rL   xdatalistmasklist_arrays                r'   r   r     s    > (11y!

1yH1;DE9abooa019HEVVx%*%*7)2  4 59DO  S(^,FLL&M 2Es
    C4Cc
                    [        U SS5      n
[        U [        R                  5      (       ak  [        U [        R
                  5      (       a-  U R                  5       R                  [        R                  5      n Uc  U R                  nU R                  5       n [        R                  R                  XX#XEXgS9R                  [        5      nUb  Xl        U	[        R                  La  [        R                  " U	5      n	[!        U	R                  5      nU(       a  XR"                  l        OMU	R&                  S:X  a,  U	 Vs/ s H  n[)        U5      PM     snUR"                  l        OUR+                  U	5        U
b  XR"                  SS& U$ s  snf )a  
Creates a MaskedRecords from a list of records.

Parameters
----------
reclist : sequence
    A list of records. Each element of the sequence is first converted
    to a masked array if needed. If a 2D array is passed as argument, it is
    processed line by line
dtype : {None, dtype}, optional
    Data type descriptor.
shape : {None,int}, optional
    Number of records. If None, ``shape`` is defined from the shape of the
    first array in the list.
formats : {None, sequence}, optional
    Sequence of formats for each individual field. If None, the formats will
    be autodetected by inspecting the fields and selecting the highest dtype
    possible.
names : {None, sequence}, optional
    Sequence of the names of each field.
fill_value : {None, sequence}, optional
    Sequence of data to be used as filling values.
mask : {nomask, sequence}, optional.
    External mask to apply on the data.

Notes
-----
Lists of tuples should be preferred over lists of lists for faster processing.

r
   Nr   rq   )rX   r   r   rY   r?   r   r   r\   r   r   r   r   r   rL   rA   r   r   r
   r-   rm   r   rG   )reclistr   r,   r8   r   r9   r;   r:   rL   rJ   r
   mrecmaskrecordlengthrS   s                 r'   r   r     s-   D GWd+E'2::&&gr~~..nn&++BJJ7G=MME.."66g% %")  @@DY 	 $299zz$tzz?"JJOYY!^156AuQx6DJJOT"

1K 7s   >F
c                    / n[         R                  " U 5      n U R                  S:X  a  U S   n OU R                  S:  a  [        S5      eU  H8  n [	        U5        UR                  [         R                  " [        5      5        M:     U$ ! [        [        4 a     [        U5        UR                  [         R                  " [        5      5         M  ! [        [        4 an     [        U5        UR                  [         R                  " [        5      5          M  ! [        [        4 a!    UR                  U R                  5           M  f = ff = ff = f)a  
Tries to guess the dtypes of the str_ ndarray `arr`.

Guesses by testing element-wise conversion. Returns a list of dtypes.
The array is first converted to ndarray. If the array is 2D, the test
is performed on the first line. An exception is raised if the file is
3D or more.

rq   r   zThe array should be 2D at most!)
r   r   rm   r   intr   r   rx   floatcomplex)arrvartypesr   s      r'   _guessvartypesr  [  s    H
**S/C
xx1}!f	A:;;	+F OOBHHSM*! " O I& 	1
1a 0 	* 77AJ OOBHHW$566 #I. /OOCII../7	1sT   B

EC&)EE#D.)EE+E	EEE	EEc                    [        U S5      (       a  U $  [        U 5      nUR                  5       SS S:w  a  UR	                  SS5        U$ UR                  5         [        S5      e! [         a  n[        SU  S35      UeSnAff = f)	z)
Opens the file handle of file `fname`.

readlinezNo such file: ''Nrq   z\xr   zWow, binary file)hasattropenFileNotFoundErrorr  seekcloser{   )fnamer   r   s      r'   openfiler    s     uj!!CK 	zz|BQ5 	q!GGI
0
11  C/% :;BCs   A& &
B0B  B)	delimitorc                   U[         R                  La*  Ub  [        S5      e[        R                  " S[
        SS9  Un[        U 5      n UR                  5       nUSUR                  U5       R                  5       n	U	R                  U5      n
[        U
5      S:  a  OMU  Uc  U
n[        R                  " U Vs/ s H>  nUS   U:w  d  M  [        U5      S:  d  M  UR                  5       R                  U5      PM@     sn5      nUR                  u  pUR                  5         Uc  [!        US   5      nOmU Vs/ s H  n[         R"                  " U5      PM     nn[        U5      U:w  a8  SnUS	-  n[        R                  " U[        U5      U4-  SS9  [!        US   5      n[%        ['        XE5      5      nU Vs/ s H  n[        R(                  " U5      PM     nnUR*                  U:H  n['        UR*                  UUU5       VVVVs/ s H  u  nnnn[        R                  " UUUUS
9PM!     nnnnn[-        UUS9$ s  snf s  snf s  snf s  snnnnf )ab  
Creates a mrecarray from data stored in the file `filename`.

Parameters
----------
fname : {file name/handle}
    Handle of an opened file.
delimiter : {None, string}, optional
    Alphanumeric character used to separate columns in the file.
    If None, any (group of) white spacestring(s) will be used.
commentchar : {'#', string}, optional
    Alphanumeric character used to mark the start of a comment.
missingchar : {'', string}, optional
    String indicating missing data, and used to create the masks.
varnames : {None, sequence}, optional
    Sequence of the variable names. If None, a list will be created from
    the first non empty line of the file.
vartypes : {None, sequence}, optional
    Sequence of the variables dtypes. If None, it will be estimated from
    the first non-commented line.


Ultra simple: the varnames are in the header, one lineNz;fromtextfile() got multiple values for argument 'delimiter'zThe 'delimitor' keyword argument of numpy.ma.mrecords.fromtextfile() is deprecated since NumPy 1.22.0, use 'delimiter' instead.rq   )
stacklevelr   r   z&Attempting to %i dtypes for %i fields!z Reverting to default.)rJ   r   rL   r*   )r   _NoValuerx   warningswarnDeprecationWarningr  r  findstripr   r   r?   masked_arrayr,   r  r  r   r   r   default_fill_valueTr   )r  	delimitercommentcharmissingcharvarnamesr  r  ftextline	firstline	_varnames
_variablesr   nfieldsvrR   r/   r   mfillvr
   arS   r&   	_datalists                           r'   r   r     sK   4 #  * + + 	 E )Q	8 	 UOE ~~0$))K01779	OOI.	y>A   E "NED$(G{$: #@?B4y1} #@$**,"4"4Y"?E "N OJ##LQ	KKM !*Q-0)12ABHHQK2x=G#:C++CMM#X 88QG%jm4H #h)*F0891b##A&F9 \\[(E%(uh%OQ%O\aAq !B%O  Q iv..5"N 3 :
Qs$   8H<	H<#H<8 I9 I&I
c                    U R                   nU R                  nUb
  U[        ;   a  S[        UR                  5      -  n[
        R                  " U5      n[        R                  " UR                  R                  X!R                  4/-   5      n[        R                  " UR                  U5      nUR                  R                  R                  5        Vs/ s H#  nUR                  " UR                  " U6 /UQ76 PM%       nUR                  " UR                   /UR                  R                  U   Q76   UR                  [         5      n[        R                  " UR"                   Vs/ s H  o[        R$                  4PM     sn5      n	[        R                  " UR                  U	5      n
UR                  R                  R                  5        Vs/ s H#  nU
R                  " UR                  " U6 /UQ76 PM%       nU
R                  " [
        R&                  " U5      /U
R                  R                  U   Q76   Xl        U$ s  snf s  snf s  snf )zAdds a new field to the masked record array

Uses `newfield` as data and `newfieldname` as name. If `newfieldname`
is None, the new field name is set to 'fi', where `i` is the number of
existing fields.

r   )r	   r
   r   r   r   r?   rC   r   r   r=   r,   rw   valuesr   rz   r\   r   r   r~   r   )mrecordnewfieldnewfieldnamer	   r
   newdtypenewdatar   r$   	newmdtypenewmasks              r'   r   r     s    MMEMME|>s5;;//xx!H xx))lNN-K,LLMHkk%++x0G kk  '')+) enna(-1-)+ X^^Igmm&:&:<&HIll=)G ?1bgg,?@Ikk%++y1G kk  '')+) enna(-1-)+ R__X. :mm**<8:MN!+ @+s   *I'I*Ir   )NNNNNFNN)N# NN)r   r  numpyr   numpy.mar?   _corerecords_byteorderconvcore_check_fill_value__all__r   r(   r1   r   r   r   r   r   rA   r   r  r  r  r   r   rs   ri   r'   <module>rF     s   	    !!00 GG-- 
 <DN%BNN N%bH 	 ;?AE(V  $4TUdbii>B"J2( FH)-M/ kkM/`"ri   