σ
ξ&]\c           @` s  d  Z  d d l m Z m Z m Z d d l Z d d l m Z d Z	 d Z
 d Z d Z d	 Z d
 Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d	 Z d
 Z d Z d Z d Z  d Z! d Z" d Z# d Z$ d Z% d Z& d Z' d Z( d Z) i d e	 6d e
 6d e 6d e 6d e 6d e 6d e 6d e 6d e 6d  e 6d e 6d e 6d e 6db dc dd de g d' 6df dg g d* 6dh di g d. 6dj dk dl dm g d2 6d3 d3 6Z* i
 d e 6d e  6d e! 6d e" 6d e# 6d e$ 6d e% 6d  e& 6d e 6d e 6Z+ i d4 e 6d5 e  6d6 e! 6d7 e" 6d8 e# 6d9 e$ 6d: e% 6d; e& 6d< e 6d= e 6d> e 6d? e 6d@ e 6dA e 6dB e 6dC e' 6dD e( 6Z, i e d 6e dE 6e dF 6e dG 6e d 6e dH 6e d 6e d 6e d 6e	 d 6e d  6e d 6e d 6e
 d 6e
 dI 6e d3 6e
 dJ 6Z- i e d 6e dE 6e dF 6e dG 6e d 6e dH 6e% d 6e# d 6e! d 6e d 6e& d  6e$ d 6e" d 6e  d 6e  dI 6e  dJ 6Z. i i dK dL 6d dM 6e 6i dN dL 6d dM 6e 6i dO dL 6d dM 6e 6Z/ dP   Z0 i  Z1 xN dQ D]F Z2 i e e* e2  dR 6e e+ e2  dS 6e0 e/ e2  dT 6Z3 e3 e1 e2 <qΓWdU e4 f dV     YZ5 dW e j6 f dX     YZ7 dY e j6 f dZ     YZ8 d[ e j6 f d\     YZ9 e j: dn do dp dq g  Z; d S(r   sΒ    Constants and classes for matlab 5 read and write

See also mio5_utils.pyx where these same constants arise as c enums.

If you make changes in this file, don't forget to change mio5_utils.pyx
i    (   t   divisiont   print_functiont   absolute_importNi   (   t   convert_dtypesi   i   i   i   i   i   i	   i   i   i   i   i   i   i   i   i
   i   t   i1t   u1t   i2t   u2t   i4t   u4t   f4t   f8t   i8t   u8t   descriptiont   S116t   subsystem_offsett   versiont   endian_testt   S2t   file_headert   mdtypet
   byte_countt   tag_fullt   byte_count_mdtypet   datat   S4t   tag_smalldatat	   data_typet   flags_classt   nzmaxt   array_flagst   U1t   int8t   uint8t   int16t   uint16t   int32t   uint32t   int64t   uint64t   singlet   doublet   cellt   structt   objectt   chart   sparset   functiont   opaquet   c32t   c24t   c16t   c8t   S1t   b1t   utf_8t   codect   widtht   utf_16t   utf_32c         C` s¨   i  } | d k r d p d } x} |  j    D]o \ } } | d } y d j |  Wn t k
 rr d | | <q+ n X| d d k r | | 7} n  | | | <q+ W| j   S(	   s’   Convert codec template mapping to byte order

    Set codecs not on this system to None

    Parameters
    ----------
    template : mapping
       key, value are respectively codec name, and root name for codec
       (without byte order suffix)
    byte_order : {'<', '>'}
       code for little or big endian

    Returns
    -------
    codecs : dict
       key, value are name, codec (as in .encode(codec))
    t   <t   _let   _beR9   t    R:   i   N(   t   itemst   encodet   LookupErrort   Nonet   copy(   t   templatet
   byte_ordert   codecst   postfixt   kt   vR9   (    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyt   _convert_codecs«   s    

s   <>t   dtypest   classesRH   t
   mat_structc           B` s   e  Z d  Z RS(   sέ    Placeholder for holding read data from structs

    We use instances of this class when the user passes False as a value to the
    ``struct_as_record`` parameter of the :func:`scipy.io.matlab.loadmat`
    function.
    (   t   __name__t
   __module__t   __doc__(    (    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyRO   Τ   s   t   MatlabObjectc           B` s#   e  Z d  Z d d  Z d   Z RS(   s+    ndarray Subclass to contain matlab object c         C` s%   t  j |  j |   } | | _ | S(   N(   t   npt   asarrayt   viewt	   classname(   t   clst   input_arrayRW   t   obj(    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyt   __new__ΰ   s    	c         C` s   t  | d d   |  _ d  S(   NRW   (   t   getattrRD   RW   (   t   selfRZ   (    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyt   __array_finalize__ι   s    N(   RP   RQ   RR   RD   R[   R^   (    (    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyRS   ή   s   	t   MatlabFunctionc           B` s   e  Z d  Z d   Z RS(   s.    Subclass to signal this is a matlab function c         C` s   t  j |  j |   } | S(   N(   RT   RU   RV   (   RX   RY   RZ   (    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyR[   ρ   s    (   RP   RQ   RR   R[   (    (    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyR_   ο   s   t   MatlabOpaquec           B` s   e  Z d  Z d   Z RS(   s3    Subclass to signal this is a matlab opaque matrix c         C` s   t  j |  j |   } | S(   N(   RT   RU   RV   (   RX   RY   RZ   (    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyR[   ψ   s    (   RP   RQ   RR   R[   (    (    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyR`   φ   s   t   s0t   Ot   s1t   s2t   arr(   R   R   (   R   R   (   R   R   (   R   R   (   R   R	   (   R   R	   (   R   R	   (   R   R   (   R   R	   (   R   R	   (   R   R	   (   R   R	   (   Ra   Rb   (   Rc   Rb   (   Rd   Rb   (   Re   Rb   (<   RR   t
   __future__R    R   R   t   numpyRT   t   miobaseR   t   miINT8t   miUINT8t   miINT16t   miUINT16t   miINT32t   miUINT32t   miSINGLEt   miDOUBLEt   miINT64t   miUINT64t   miMATRIXt   miCOMPRESSEDt   miUTF8t   miUTF16t   miUTF32t   mxCELL_CLASSt   mxSTRUCT_CLASSt   mxOBJECT_CLASSt   mxCHAR_CLASSt   mxSPARSE_CLASSt   mxDOUBLE_CLASSt   mxSINGLE_CLASSt   mxINT8_CLASSt   mxUINT8_CLASSt   mxINT16_CLASSt   mxUINT16_CLASSt   mxINT32_CLASSt   mxUINT32_CLASSt   mxINT64_CLASSt   mxUINT64_CLASSt   mxFUNCTION_CLASSt   mxOPAQUE_CLASSt   mxOBJECT_CLASS_FROM_MATRIX_Ht   mdtypes_templatet   mclass_dtypes_templatet   mclass_infot   NP_TO_MTYPESt   NP_TO_MXTYPESt   codecs_templateRL   t   MDTYPESt	   _bytecodet   _defR-   RO   t   ndarrayRS   R_   R`   t   dtypet   OPAQUE_DTYPE(    (    (    s:   lib/python2.7/site-packages/scipy/io/matlab/mio5_params.pyt   <module>   s  






	!
