
    IR-el                        d Z ddlZddlZddlZddlZddlZddlmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ ddlZdd	lmZ g d
Z eed          fZe	d             Zd Zd Zd Zd!dZ G d d          Z G d d          Z G d de          Z  G d de           Z! G d de!          Z" G d de"          Z# G d d e#          Z$dS )"a  This module contains functions and methods that relate to the DataInfo class
which provides a container for informational attributes as well as summary info
methods.

A DataInfo object is attached to the Quantity, SkyCoord, and Time classes in
astropy.  Here it allows those classes to be used in Tables and uniformly carry
table column attributes such as name, format, dtype, meta, and description.
    N)OrderedDict)contextmanager)deepcopy)partial)StringIO   )metadata)data_info_factorydtype_info_nameBaseColumnInfoDataInfo	MixinInfoParentDtypeInfozUAll-NaN|Mean of empty slice|Degrees of freedom <= 0|invalid value encountered in sqrt)categorymessagec              #   ~   K   t           j        }| t           _        	 dV  |t           _        dS # |t           _        w xY w)av  Set context for serialization.

    This will allow downstream code to understand the context in which a column
    is being serialized.  Objects like Time or SkyCoord will have different
    default serialization representations depending on context.

    Parameters
    ----------
    context : str
        Context name, e.g. 'fits', 'hdf5', 'parquet', 'ecsv', 'yaml'
    N)r   _serialize_context)contextold_contexts     7lib/python3.11/site-packages/astropy/utils/data_info.pyserialize_context_asr   6   sH       !3K(/N%8,7)))K)7777s   . <c                    t          j        |           } | j        <d                    d | j                                        D                       }d| dS | j        | j        \  } }nd}| j        dv rB| j        dk    rd	nd
}t          j	        d| j
                                      d          }||z   }n| j        }|r&|dd                    d |D                        dz  }|S )ai  Return a human-oriented string name of the ``dtype`` arg.
    This can be use by astropy methods that present type information about
    a data object.

    The output is mostly equivalent to ``dtype.name`` which takes the form
    <type_name>[B] where <type_name> is like ``int`` or ``bool`` and [B] is an
    optional number of bits which gets included only for numeric types.

    The output is shown below for ``bytes`` and ``str`` types, with <N> being
    the number of characters. This representation corresponds to the Python
    type that matches the dtype::

      Numpy          S<N>      U<N>
      Python      bytes<N>   str<N>

    Parameters
    ----------
    dtype : str, `~numpy.dtype`, type
        Input as an object that can be converted via :class:`numpy.dtype`.

    Returns
    -------
    dtype_info_name : str
        String name of ``dtype``
    Nz, c              3   @   K   | ]}t          |d                    V  dS )r   N)r   ).0dts     r   	<genexpr>z"dtype_info_name.<locals>.<genexpr>g   s.      VV"r!u55VVVVVV    () )SUr!   bytesstrz(\d+)r   [,c              3   4   K   | ]}t          |          V  d S N)r$   )r   ns     r   r   z"dtype_info_name.<locals>.<genexpr>v   s(      22qCFF222222r   ])npdtypenamesjoinfieldsvaluessubdtypekindresearchr$   groupname)r,   
info_namesshape	type_namelengthouts         r   r   r   K   s   4 HUOOE{YYVV@S@S@U@UVVVVV
 :    ~!~uuzZ$zS00GGe	8UY//55a88& j 6538822E222225555Jr   c                       fd}|S )a4  
    Factory to create a function that can be used as an ``option``
    for outputting data object summary information.

    Examples
    --------
    >>> from astropy.utils.data_info import data_info_factory
    >>> from astropy.table import Column
    >>> c = Column([4., 3., 2., 1.])
    >>> mystats = data_info_factory(names=['min', 'median', 'max'],
    ...                             funcs=[np.min, np.median, np.max])
    >>> c.info(option=mystats)
    min = 1
    median = 2.5
    max = 4
    n_bad = 0
    length = 4

    Parameters
    ----------
    names : list
        List of information attribute names
    funcs : list
        List of functions that compute the corresponding information attribute

    Returns
    -------
    func : function
        Function that can be used as a data info option
    c                    g }t                    D ]\  }}	 t          |t                    r t          | |                      }n ||           }	 |                    |d           X# t
          t          f$ r% |                    t          |                     Y w xY w# t          $ r |                    d           Y w xY wt          t          |                    S )Ngz--)	zip
isinstancer$   getattrappend	TypeError
ValueError	Exceptionr   )datoutsr6   funcr;   funcsr-   s        r   rH   zdata_info_factory.<locals>.func   s   eU++ 	* 	*JD$*dC(( $,'#t,,..CC$s))C*KK3

++++!:. * * *KKC)))))*  " " "D!!!!!" 3ud++,,,s#   9B%A,,3B"!B"%CCr    )r-   rI   rH   s   `` r   r
   r
   {   s*    @- - - - - -$ Kr   c                 D    i }|D ]}t          | |d          }||||<   |S )a  
    Get the values for object ``attrs`` and return as a dict.  This
    ignores any attributes that are None.  In the context of serializing
    the supported core astropy classes this conversion will succeed and
    results in more succinct and less python-specific YAML.
    N)rA   )objattrsr;   attrvals        r   _get_obj_attrs_maprO      s=     C  c4&&?CIJr   c                     |dk    rt          |           j        }nQ|dk    rt          | j        j                  }n1|dk    r| j        dd         }|r|nd}nt          | j        |          }|d}t          |          S )zQ
    Get a data object attribute for the ``attributes`` info summary method.
    classr,   r8   r   N )type__name__r   infor,   r8   rA   r$   )rF   rM   rN   datshapes       r   _get_data_attributerW      s     w3ii 	chn--	9QRR="*hhch%%
{s88Or   c                   "    e Zd ZddZd Zd ZdS )InfoAttributeNc                 "    || _         || _        d S r(   )rM   default)selfrM   r[   s      r   __init__zInfoAttribute.__init__   s    	r   c                 T    || S |j                             | j        | j                  S r(   )_attrsgetrM   r[   r\   instance	owner_clss      r   __get__zInfoAttribute.__get__   s)    K""49dl;;;r   c                 F    |t          d          ||j        | j        <   d S Ncannot set unbound descriptor)rD   r_   rM   r\   rb   values      r   __set__zInfoAttribute.__set__   s+    <===%*	"""r   r(   rT   
__module____qualname__r]   rd   rj   r    r   r   rY   rY      sF           < < <+ + + + +r   rY   c                        e Zd Zd Zd Zd ZdS )ParentAttributec                     || _         d S r(   rM   )r\   rM   s     r   r]   zParentAttribute.__init__   s    			r   c                 >    || S t          |j        | j                  S r(   )rA   _parentrM   ra   s      r   rd   zParentAttribute.__get__   s"    Kx'333r   c                 ^    |t          d          t          |j        | j        |           d S rf   )rD   setattrrs   rM   rh   s      r   rj   zParentAttribute.__set__   s4    <=== $)U33333r   Nrk   r    r   r   ro   ro      sA          4 4 44 4 4 4 4r   ro   c                   (     e Zd Z fdZ fdZ xZS )DataInfoMetac                 x    |                     dg            t                                          | |||          S )N	__slots__)
setdefaultsuper__new__)mclsr6   basesdct	__class__s       r   r|   zDataInfoMeta.__new__   s5     	{B'''wwtT5#666r   c                    t                                          |||           | j        D ]}||vrt          | |d           }|| j        v r8d|v r3t          |t                    st          | |t          |                     X|rt          |t                    r7t          | |t          || j	        
                    |                               d S )Nattrs_from_parent)r{   r]   
attr_namesrA   r   r@   ro   ru   rY   _attr_defaultsr`   )clsr6   r~   r   rM   cls_attrr   s         r   r]   zDataInfoMeta.__init__   s    uc*** N 	 	D3 #3d333000 +c11* /; ;1  T?4+@+@AAA! Z/%J%J 
 T=s7I7M7Md7S7S#T#T  '	 	r   )rT   rl   rm   r|   r]   __classcell__r   s   @r   rw   rw      sQ        7 7 7 7 7        r   rw   c                   b    e Zd ZdZg dZ e            Zh dZd ej	        d          iZ
 e            ZdZg dZdZdZd	ZddZed             Zd Zd Zd Zd ZddZd Z e eed eD                                 Z e eed eD                                 ZddZ fdZ xZ S )r   a  
    Descriptor that data classes use to add an ``info`` attribute for storing
    data attributes in a uniform and portable way.  Note that it *must* be
    called ``info`` so that the DataInfo() object can be stored in the
    ``instance`` using the ``info`` key.  Because owner_cls.x is a descriptor,
    Python doesn't use __dict__['x'] normally, and the descriptor can safely
    store stuff there.  Thanks to
    https://nbviewer.jupyter.org/urls/gist.github.com/ChrisBeaumont/5758381/raw/descriptor_writeup.ipynb
    for this trick that works for non-hashable classes.

    Parameters
    ----------
    bound : bool
        If True this is a descriptor attribute in a class definition, else it
        is a DataInfo() object that is bound to a data object instance. Default is False.
    )meanstdminmax>   metar6   unitr,   formatdescriptionr,   O)r,   r8   r   r   r   rQ   )_parent_cls_parent_refr_   r    NFc                     |r	i | _         d S d S r(   r_   )r\   bounds     r   r]   zDataInfo.__init__I  s!      	DKKK	 	r   c                 v    	 |                                  }n# t          $ r Y d S w xY w|t          d          |S )Na  failed to access "info" attribute on a temporary object.

It looks like you have done something like ``col[3:5].info`` or
``col.quantity.info``, i.e.  you accessed ``info`` from a temporary slice
object that only exists momentarily.  This has failed because the reference to
that temporary object is now lost.  Instead force a permanent reference (e.g.
``c = col[3:5]`` followed by ``c.info``).)r   AttributeError)r\   parents     r   rs   zDataInfo._parentP  sa    	%%''FF 	 	 	44	 > -	 	 	 s    
%%c                     |	|| _         | S |j                            d          }| |                     d          x}|j        d<   t	          j        |          |_        |S )NrU   Tr   )r   __dict__r`   r   weakrefrefr   )r\   rb   rc   rU   s       r   rd   zDataInfo.__get__e  si    (DK $$V,,</3~~D~/I/IID8$V, #;x00r   c                    |t          d          t          |t                    r|                     d          x}|j        d<   |j        }|j        | j        u r|t          |j                  z  }n||j        |j        z
  z  }||j	        z
  |j        z
  D ]'}t          t          ||                    |j        |<   (d S t          d          )Nrg   Tr   rU   z)info must be set with a DataInfo instance)rD   r@   r   r   r   r   setr_   _attrs_no_copyr   r   rA   rC   )r\   rb   ri   rU   r   rM   s         r   rj   zDataInfo.__set__t  s    <===eX&& 	I/3~~D~/I/IID8$V,J$.00 (#el*;*;;

 (5+;e>R+RS
"T%;;d>QQ C C$,WUD-A-A$B$BD!!C C GHHHr   c                     | j         S r(   r   r\   s    r   __getstate__zDataInfo.__getstate__  s
    {r   c                     || _         d S r(   r   )r\   states     r   __setstate__zDataInfo.__setstate__  s    r   c                 >    || j         }t          | j        |          S )z|Get the values for the parent ``attrs`` and return as a dict.

        By default, uses '_represent_as_dict_attrs'.
        )_represent_as_dict_attrsrO   rs   )r\   rL   s     r   _represent_as_dictzDataInfo._represent_as_dict  s#    
 =1E!$,666r   c                 D    fd| j         D             } | j        |i S )Nc                 :    g | ]}                     |          S r    )pop)r   rM   maps     r   
<listcomp>z1DataInfo._construct_from_dict.<locals>.<listcomp>  s#    III$IIIr   )_construct_from_dict_argsr   )r\   r   argss    ` r   _construct_from_dictzDataInfo._construct_from_dict  s7    IIII$*HIIIt----r   c                 :    g | ]}t          t          |           S )rq   )r   rW   )r   rM   s     r   r   zDataInfo.<listcomp>  s3       <@+$777  r   )r-   rI   c                 >    g | ]}t          t          d |z             S )nan)rA   r+   )r   stats     r   r   zDataInfo.<listcomp>  s&     N N NtUT\!:!: N N Nr   
attributesrR   c                    |dk    rt           j        }| j        }t                      }|j        j        }|||d<   t          |t          t          f          r|n|g}|D ]}t          |t                    r:t          | d|z             rt          | d|z             }nt          d|d          t          j                    5  t          D ]}t          j        di | |                     ||                     ddd           n# 1 swxY w Y   t          |d          rt%          j        |j                  }nO	 t%          j        t%          j        |          t%          j        |          z            }n# t.          $ r d	}Y nw xY w||d
<   	 t1          |          |d<   n# t2          t4          f$ r Y nw xY w||S |                                D ]2\  }	}
|
dk    r'|                    |	 d|
 t:          j        z              3dS )a  
        Write summary information about data object to the ``out`` filehandle.
        By default this prints to standard output via sys.stdout.

        The ``option`` argument specifies what type of information
        to include.  This can be a string, a function, or a list of
        strings or functions.  Built-in options are:

        - ``attributes``: data object attributes like ``dtype`` and ``format``
        - ``stats``: basic statistics: min, mean, and max

        If a function is specified then that function will be called with the
        data object as its single argument.  The function must return an
        OrderedDict containing the information attributes.

        If a list is provided then the information attributes will be
        appended for each of the options, in order.

        Examples
        --------
        >>> from astropy.table import Column
        >>> c = Column([1, 2], unit='m', dtype='int32')
        >>> c.info()
        dtype = int32
        unit = m
        class = Column
        n_bad = 0
        length = 2

        >>> c.info(['attributes', 'stats'])
        dtype = int32
        unit = m
        class = Column
        mean = 1.5
        std = 0.5
        min = 1
        max = 2
        n_bad = 0
        length = 2

        Parameters
        ----------
        option : str, callable, list of (str or callable)
            Info option, defaults to 'attributes'.
        out : file-like, None
            Output destination, defaults to sys.stdout.  If None then the
            OrderedDict with information attributes is returned

        Returns
        -------
        info : `~collections.OrderedDict` or None
            `~collections.OrderedDict` if out==None else None
        rR   Nr6   info_summary_zoption=z# is not an allowed information typeignoremaskr   n_badr:   z = )r   )sysstdoutrs   r   rU   r6   r@   listtupler$   hasattrrA   rD   warningscatch_warningsIGNORE_WARNINGSfilterwarningsupdater+   count_nonzeror   isinfisnanrE   lenrC   
IndexErroritemswriteoslinesep)r\   optionr;   rF   rU   r6   optionsignore_kwargsr   keyrN   s              r   __call__zDataInfo.__call__  s   l "99*Cl}}x}DL&ve}==K&&F8 
	) 
	)F&#&& V46!9:: V$T?V+CDDFF$%T%T%T%TUUU(** ) )%4 G GM+FFFFFFFF3KK((() ) ) ) ) ) ) ) ) ) ) ) ) ) )
 3 	$SX..EE(##)FGG   W	 XXDNN:& 	 	 	D	 ;K

 	9 	9HCbyy		S**S**RZ7888	9 	9s6   :DD	D	?;E; ;F
	F
F& &F:9F:c                     | j          t                                                      S t                      }|                     |           |                                S )N)r;   )rs   r{   __repr__r   r   getvalue)r\   r;   r   s     r   r   zDataInfo.__repr__  sL    <77##%%%jj#||~~r   Fr(   )r   rR   )!rT   rl   rm   __doc___statsr   r   r   r+   r,   r   r   _info_summary_attrsry   r   r   _represent_as_dict_primary_datar]   propertyrs   rd   rj   r   r   r   r   staticmethodr
   info_summary_attributesinfo_summary_statsr   r   r   r   s   @r   r   r     s        " +**FKKKJxrx}}-NSUUNV888I  " !# '+#      X(  I I I.    7 7 7 7. . . +l% DW  	
 	
 	
  & N Nv N N N	
 	
 	
 _9 _9 _9 _9B        r   r   )	metaclassc                        e Zd ZdZej        ddhz  ZddhZdZddgZe	d             Z
e
j        d             Z
d fd
	Z fdZd Ze	d             Zej        d             Zd Zd Zed             Zd Z xZS )r   ab  Base info class for anything that can be a column in an astropy Table.

    There are at least two classes that inherit from this:

      ColumnInfo: for native astropy Column / MaskedColumn objects
      MixinInfo: for mixin column objects

    Note that this class is defined here so that mixins can use it
    without importing the table package.
    parent_tableindicesN_format_funcs_copy_indicesc                 l    | j                             d          }t          |          r
 |            }|S Nr   )r_   r`   callable)r\   ri   s     r   r   zBaseColumnInfo.parent_table0  s3    //E?? 	EGGEr   c                     || j                             dd            d S t          j        |          }|| j         d<   d S r   )r_   r   r   r   )r\   r   s     r   r   zBaseColumnInfo.parent_table7  sE    KOOND11111";|44L*6DK'''r   Fc                 b    t                                          |           |r	i | _        d S d S )Nr   )r{   r]   r   )r\   r   r   s     r   r]   zBaseColumnInfo.__init__?  s@    u%%%  	$!#D	$ 	$r   c                     	 |j         sd S n# t          $ r Y nw xY wt                                          ||           d S r(   )r8   r   r{   rj   )r\   rb   ri   r   s      r   rj   zBaseColumnInfo.__set__G  s\    	>  	 	 	D	 	%(((((s    
c              #      K   | j         }| j        ddlm} n| j        j        }|j        } ||dddi           E d{V  dS )zG
        This is a mixin-safe version of Column.iter_str_vals.
        Nr   )	FORMATTERF)rs   r   astropy.table.columnr   	formatter_pformat_col_iter)r\   colr   r   s       r   iter_str_valszBaseColumnInfo.iter_str_valsQ  sr       l$CCCCCCC)3I%7$$S"eUB???????????r   c                 8    | j                             dg           S Nr   )r_   rz   r   s    r   r   zBaseColumnInfo.indices^  s     {%%i444r   c                     || j         d<   d S r   r   )r\   r   s     r   r   zBaseColumnInfo.indicesf  s    !(Ir   c                    | j         sdS t          |t                    r,|                     |          }t          t	          |           }nHt          |t
          j                  r+|j        j        dk    rt          j	        |          d         }n|g}t          j
        |          }|j        dk    rt          |          t          |          z  }t          ||          D ]+\  }}| j         D ]}|                    || j        |           ,dS )a  
        Adjust info indices after column modification.

        Parameters
        ----------
        index : slice, int, list, or ndarray
            Element(s) of column to modify. This parameter can
            be a single row number, a list of row numbers, an
            ndarray of row numbers, a boolean ndarray (a mask),
            or a column slice.
        value : int, list, or ndarray
            New value(s) to insert
        col_len : int
            Length of the column
        Nbr   r   )r   r@   slicer   ranger+   ndarrayr,   r2   where
atleast_1dsizer   r?   replacer6   )	r\   indexri   col_lentkeysr   rN   	col_indexs	            r   adjust_indiceszBaseColumnInfo.adjust_indicesj  s     | 	FeU## 	g&&Aq	??DDrz** 	u{/?3/F/F8E??1%DD7De$$:??KK#d))+ED%(( 	7 	7HC!\ 7 7	!!#ty#66667	7 	7r   c                 ~   ddl m} t          | dd          sg |j        _        |S t          t                    rfd| j        D             |j        _        n| j        rt          t          j                  r*j	        j
        dk    rt          j                  d         t                    d|z  k    }g |j        _        | j        D ]n}|st          ||          r|                    |          }n$t          |          }|                               |j        j                            |           o|S )a  
        Given a sliced object, modify its indices
        to correctly represent the slice.

        Parameters
        ----------
        col_slice : `~astropy.table.Column` or mixin
            Sliced object. If not a column, it must be a valid mixin, see
            https://docs.astropy.org/en/stable/table/mixin_columns.html
        item : slice, list, or ndarray
            Slice used to create col_slice
        col_len : int
            Length of original object
        r   )SortedArrayr   Tc                      g | ]
}|         S r    r    )r   xitems     r   r   z0BaseColumnInfo.slice_indices.<locals>.<listcomp>  s    %D%D%D!ag%D%D%Dr   r   g333333?)astropy.table.sorted_arrayr	  rA   rU   r   r@   r   r+   r   r,   r2   r   r   	get_slicer   replace_rowsrB   )r\   	col_slicer  r  r	  smallr  	new_indexs     `     r   slice_indiceszBaseColumnInfo.slice_indices  sN    	;:::::t_d33 	9%'IN"e$$ 	9%D%D%D%Dt|%D%D%DIN""\ 	9$
++ )
30F0Fx~~a(
 IIw.E%'IN" 9 9 1Juk:: 1 %	4 @ @II (I**4000&--i8888r   c                 f   ddl m} fd}fd} || d                   }| dd         D ]#}t          j        | ||          ||          }$t          j        |           |d<   d	 | D             }	t          |	          dk    r |d
          |	                                |d<   |d<   |S )a  
        Utility method to merge and validate the attributes ``attrs`` for the
        input table columns ``cols``.

        Note that ``dtype`` and ``shape`` attributes are handled specially.
        These should not be passed in ``attrs`` but will always be in the
        returned dict of merged attributes.

        Parameters
        ----------
        cols : list
            List of input Table column objects
        metadata_conflicts : str ('warn'|'error'|'silent')
            How to handle metadata conflicts
        name : str
            Output column name
        attrs : list
            List of attribute names to be merged

        Returns
        -------
        attrs : dict
            Of merged attributes.

        r   )TableMergeErrorc                 ,    d d|  d| d| d| d}|S )NzIn merged column 'z' the 'z' attribute does not match (z != z
).  Using z for merged outputr    )r   leftrightr;   r6   s       r   warn_str_funcz;BaseColumnInfo.merge_cols_attributes.<locals>.warn_str_func  sd    IT I I# I II I#I I/4I I I  Jr   c                 "      fdD             S )Nc                 h    i | ].}t          j        |d           |t          j        |          /S r(   )rA   rU   )r   rM   r   s     r   
<dictcomp>zJBaseColumnInfo.merge_cols_attributes.<locals>.getattrs.<locals>.<dictcomp>  sE       38T400< gch--<<<r   r    )r   rL   s   `r   getattrsz6BaseColumnInfo.merge_cols_attributes.<locals>.getattrs  s/       !   r   r   N)metadata_conflictsr  r,   c                 ,    h | ]}|j         d d         S )r   N)r8   )r   r   s     r   	<setcomp>z7BaseColumnInfo.merge_cols_attributes.<locals>.<setcomp>  s"    555sy}555r   zcolumns have different shapesr8   r6   )astropy.table.np_utilsr  r	   mergecommon_dtyper   r   )
colsr  r6   rL   r  r  r  r;   r   uniq_shapess
     ``      r   merge_cols_attributesz$BaseColumnInfo.merge_cols_attributes  s   6 	;:::::	 	 	 	 		 	 	 	 	 htAw8 	 	C.#5+	  CC  ,T22G 65555{q  !/"ABBB"((G CK
r   c                 2    t          d| j         d          )a
  
        Return a list of arrays which can be lexically sorted to represent
        the order of the parent column.

        The base method raises NotImplementedError and must be overridden.

        Returns
        -------
        arrays : list of ndarray
        zcolumn z is not sortable)NotImplementedErrorr6   r   s    r   get_sortable_arraysz"BaseColumnInfo.get_sortable_arrays  s      ""GDI"G"G"GHHHr   r   )rT   rl   rm   r   r   r   r   r   ry   r   r   setterr]   rj   r   r   r  r  r   r&  r)  r   r   s   @r   r   r     sg       	 	 $	'BBJ$i0N  /2I  X 7 7 7$ $ $ $ $ $) ) ) ) )@ @ @ 5 5 X5 ^) ) ^)$7 $7 $7L) ) )V @ @ \@DI I I I I I Ir   r   c                   Z    e Zd Zed             Zej        d             Zed             ZdS )r   c                 6    | j                             d          S Nr6   )r_   r`   r   s    r   r6   zMixinInfo.name  s    {v&&&r   c                     | j         8|d nt          |          }| j         j                            | j        |           || j        d<   d S r-  )r   r$   columns_rename_columnr6   r_   )r\   r6   new_names      r   r6   zMixinInfo.name  sP    
 (#|ttTH%44TYIII"Fr   c                 t    ddl m} | j                            d|                    | j                            S )Nr   )groupsr3  )astropy.tabler3  r_   rz   ColumnGroupsrs   )r\   r3  s     r   r3  zMixinInfo.groups  s>     	)((((({%%h0C0CDL0Q0QRRRr   N)rT   rl   rm   r   r6   r*  r3  r    r   r   r   r     sj        ' ' X' 
[# # [# S S XS S Sr   r   c                       e Zd ZdZdhZdS )r   z'Mixin that gets info.dtype from parent.r,   N)rT   rl   rm   r   r   r    r   r   r   r   '  s        11 	r   r   r(   )%r   r   r3   r   r   r   collectionsr   
contextlibr   copyr   	functoolsr   ior   numpyr+   rR   r	   __all__dictRuntimeWarningr   r   r   r
   rO   rW   rY   ro   rS   rw   r   r   r   r   r    r   r   <module>r@     s    
			 				 



   # # # # # # % % % % % %                               	D0  	 8 8 8(- - -`2 2 2j      $+ + + + + + + +&4 4 4 4 4 4 4 4$         4      F{ { { { { { { { {|qI qI qI qI qIX qI qI qIhS S S S S S S S6" " " " "i " " " " "r   