
˽Xc           @` sH  d  Z  d d l m Z m Z m 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 Z d d l Z d d l m Z m Z d d l Z d d l m Z d d l m Z m Z d d	 l m Z m Z m Z m Z m Z m Z m Z m  Z  m! Z! d d
 l" m# Z# d d l$ m% Z% m& Z& m' Z' m( Z( m) Z) m* Z* m+ Z+ m, Z, m- Z- m. Z. m/ Z/ m0 Z0 m1 Z1 m2 Z2 m3 Z3 m4 Z4 m5 Z5 d d l6 m7 Z7 d e f d     YZ8 d   Z9 d e: f d     YZ; d   Z< e' e d d Z= e' e d d Z> e' e d d Z? e' e d d Z@ d e: f d     YZA d e: f d     YZB d S(   s    Classes for read / write of matlab (TM) 5 files

The matfile specification last found here:

http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf

(as of December 5 2008)
i    (   t   divisiont   print_functiont   absolute_importN(   t   BytesIO(   t   asbytest   asstr(   t   string_typesi   (   t   native_codet   swapped_code(	   t   MatFileReadert	   docfillert   matdimst
   read_dtypet   arr_to_charst   arr_dtype_numbert   MatWriteErrort   MatReadErrort   MatReadWarning(   t
   VarReader5(   t   MatlabObjectt   MatlabFunctiont   MDTYPESt   NP_TO_MTYPESt   NP_TO_MXTYPESt   miCOMPRESSEDt   miMATRIXt   miINT8t   miUTF8t   miUINT32t   mxCELL_CLASSt   mxSTRUCT_CLASSt   mxOBJECT_CLASSt   mxCHAR_CLASSt   mxSPARSE_CLASSt   mxDOUBLE_CLASSt   mclass_info(   t   ZlibInputStreamt   MatFile5Readerc        
   B` sz   e  Z d  Z e d	 e e e e e e d	 d   Z d   Z d   Z	 d   Z
 d   Z e d  Z d	 d  Z d   Z RS(
   s   Reader for Mat 5 mat files
    Adds the following attribute to base class

    uint16_codec - char codec to use for uint16 char arrays
        (defaults to system default codec)

    Uses variable reader that has the following stardard interface (see
    abstract class in ``miobase``::

       __init__(self, file_reader)
       read_header(self)
       array_from_header(self)

    and added interface::

       set_stream(self, stream)
       read_full_tag(self)

    c
   
   	   C` s_   t  t |   j | | | | | | | |  |	 s@ t j   }	 n  |	 |  _ d |  _ d |  _ d S(   s   Initializer for matlab 5 file format reader

    %(matstream_arg)s
    %(load_args)s
    %(struct_arg)s
    uint16_codec : {None, string}
        Set codec to use for uint16 char arrays (e.g. 'utf-8').
        Use system default codec if None
        N(	   t   superR%   t   __init__t   syst   getdefaultencodingt   uint16_codect   Nonet   _file_readert   _matrix_reader(
   t   selft
   mat_streamt
   byte_ordert	   mat_dtypet
   squeeze_met   chars_as_stringst   matlab_compatiblet   struct_as_recordt    verify_compressed_data_integrityR*   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR'      s    		c         C` sH   |  j  j d  |  j  j d  } |  j  j d  | d k rD d pG d S(   s4    Guess byte order.
        Sets stream pointer to 0 i~   i   i    t   IMt   <t   >(   R/   t   seekt   read(   R.   t   mi(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   guess_byte_order   s    c         C` s~   i  } t  |  j d d } t |  j |  } | d j   j d  | d <| d d ?} | d d @} d	 | | f | d
 <| S(   s    Read in mat 5 file header t   dtypest   file_headert   descriptions    	
 t
   __header__t   versioni   i   s   %d.%dt   __version__(   R   R0   R   R/   t   itemt   strip(   R.   t   hdictt	   hdr_dtypet   hdrt   v_majort   v_minor(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   read_file_header   s    c         C` s"   t  |   |  _ t  |   |  _ d S(   sa    Run when beginning read of variables

        Sets up readers from parameters in `self`
        N(   R   R,   R-   (   R.   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   initialize_read   s    c         C` s   |  j  j   \ } } | d k s0 t d   n  |  j j   | } | t k r t |  j |  } |  j j |  |  j	 } |  j j   \ } } n t
 } |  j j |  j  | t k s t d |   n  |  j j |  } | | f S(   s   Read header, return header, next position

        Header has to define at least .name and .is_global

        Parameters
        ----------
        None

        Returns
        -------
        header : object
           object that can be passed to self.read_var_array, and that
           has attributes .name and .is_global
        next_position : int
           position in stream of next variable
        i    s   Did not read any bytess$   Expecting miMATRIX type here, got %d(   R,   t   read_full_tagt
   ValueErrorR/   t   tellR   R$   R-   t
   set_streamR6   t   FalseR   t	   TypeErrort   read_header(   R.   t   mdtypet
   byte_countt   next_post   streamt   check_stream_limitt   header(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   read_var_header   s    	c         C` s   |  j  j | |  S(   s   Read array, given `header`

        Parameters
        ----------
        header : header object
           object with fields defining variable header
        process : {True, False} bool, optional
           If True, apply recursive post-processing during loading of
           array.

        Returns
        -------
        arr : array
           array with post-processing applied or not according to
           `process`.
        (   R-   t   array_from_header(   R.   RY   t   process(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   read_var_array   s    c   	      C` s  t  | t  r | g } n | d
 k	 r6 t |  } n  |  j j d  |  j   |  j   } g  | d <xh|  j   s|  j	   \ } } t
 | j  } | | k r t j d | t d d n  | d k r d } t } n t } | d
 k	 r| | k r|  j j |  qi n  y |  j | |  } Wn= t k
 rc} t j d | | f t d d d	 | } n X|  j j |  | | | <| j r| d j |  n  | d
 k	 ri | j |  t |  d k rPqqi qi W| S(   s    get variables from stream as dictionary

        variable_names   - optional list of variable names to get

        If variable_names is None, then get all variables in file
        i    t   __globals__s   Duplicate variable name "%s" in stream - replacing previous with new
Consider mio5.varmats_from_mat to split file into single variable filest
   stackleveli   t    t   __function_workspace__s&   Unreadable variable "%s", because "%s"s   Read error: %sN(   t
   isinstanceR   R+   t   listR/   R:   RL   RK   t   end_of_streamRZ   R   t   namet   warningst   warnR   RQ   t   TrueR]   R   t   Warningt	   is_globalt   appendt   removet   len(	   R.   t   variable_namest   mdictRH   t   next_positionRe   R\   t   rest   err(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   get_variables   sN    

		

	c         C` s   |  j  j d  |  j   |  j   g  } x |  j   s |  j   \ } } t | j  } | d k ro d } n  |  j j	 |  } | j
 r d } n t j | j d  } | j | | | f  |  j  j |  q- W| S(   s    list variables from stream i    R`   Ra   t   logicalt   unknown(   R/   R:   RL   RK   Rd   RZ   R   Re   R-   t   shape_from_headert
   is_logicalR#   t   gett   mclassRk   (   R.   t   varsRH   Rp   Re   t   shapet   info(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   list_variables5  s     

			N(   t   __name__t
   __module__t   __doc__R
   R+   RQ   Rh   R'   R=   RK   RL   RZ   R]   Rs   R}   (    (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR%   n   s"   				#7c         C` s  t  |   } |  j d  t t d d j } |  j |  } |  j d  | j   | j   } |  j   } g  } x | j	   s| } | j
   \ } } t | j  }	 |  j |  | | }
 |  j |
  } t   } | j |  | j |  | j d  | j |	 | f  qu W| S(   s   Pull variables out of mat 5 file as a sequence of mat file objects

    This can be useful with a difficult mat file, containing unreadable
    variables.  This routine pulls the variables out in raw form and puts them,
    unread, back into a file stream for saving or reading.  Another use is the
    pathological case where there is more than one variable of the same name in
    the file; this routine returns the duplicates, whereas the standard reader
    will overwrite duplicates in the returned dictionary.

    The file pointer in `file_obj` will be undefined.  File pointers for the
    returned file-like objects are set at 0.

    Parameters
    ----------
    file_obj : file-like
        file object containing mat file

    Returns
    -------
    named_mats : list
        list contains tuples of (name, BytesIO) where BytesIO is a file-like
        object containing mat file contents as for a single variable.  The
        BytesIO contains a string with the original header and a single var. If
        ``var_file_obj`` is an individual BytesIO instance, then save as a mat
        file with something like ``open('test.mat',
        'wb').write(var_file_obj.read())``

    Examples
    --------
    >>> import scipy.io

    BytesIO is from the ``io`` module in python 3, and is ``cStringIO`` for
    python < 3.

    >>> mat_fileobj = BytesIO()
    >>> scipy.io.savemat(mat_fileobj, {'b': np.arange(10), 'a': 'a string'})
    >>> varmats = varmats_from_mat(mat_fileobj)
    >>> sorted([name for name, str_obj in varmats])
    ['a', 'b']
    i    R>   R?   (   R%   R:   R   R   t   itemsizeR;   RL   RK   RO   Rd   RZ   R   Re   R   t   writeRk   (   t   file_objt   rdrt   hdr_lent   raw_hdrRo   Rp   t
   named_matst   start_positionRH   Re   RU   t   var_strt   out_obj(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   varmats_from_matN  s,    )

	t   EmptyStructMarkerc           B` s   e  Z d  Z RS(   s=    Class to indicate presence of empty matlab struct on output (   R~   R   R   (    (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s   c         C` su  t  |  t j  r |  S|  d k r& d St |  d  oP t |  d  oP t |  d  } | r t |  d  r t d   |  j j   D  }  t } n  | r(g  } g  } x\ |  j   D]N \ } } t  | t	  r | d d k r | j
 | t f  | j
 |  q q W| r!t j t |  g |  St Sn  t j |   } | j j t t j f k rq| j d	 k rq| |  k rqd S| S(
   s   Convert input object ``source`` to something we can write

    Parameters
    ----------
    source : object

    Returns
    -------
    arr : None or ndarray or EmptyStructMarker
        If `source` cannot be converted to something we can write to a matfile,
        return None.  If `source` is equivalent to an empty dictionary, return
        ``EmptyStructMarker``.  Otherwise return `source` converted to an
        ndarray with contents for writing to matfile.
    t   keyst   valuest   itemst   __dict__c         s` s0   |  ]& \ } } | j  d   s | | f Vq d S(   t   _N(   t
   startswith(   t   .0t   keyt   value(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pys	   <genexpr>  s    	i    t   _0123456789N(    (   Rb   t   npt   ndarrayR+   t   hasattrt   dictR   R   Rh   R   Rk   t   objectt   arrayt   tupleR   t
   asanyarrayt   dtypet   typet   object_R{   (   t   sourcet
   is_mappingR   R   t   fieldR   t   narr(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   to_writeable  s2    	R>   R?   t   tag_fullt   tag_smalldatat   array_flagst
   VarWriter5c           B` s   e  Z d  Z e j d e  Z e e d <d   Z d   Z	 d   Z
 d d  Z d   Z d   Z e e d d	  Z d
   Z d   Z d   Z d   Z d d  Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   s%    Generic matlab matrix writing class RT   c         C` sF   | j  |  _  | j |  _ | j |  _ | j |  _ d  |  _ t |  _ d  S(   N(   t   file_streamt   unicode_stringst   long_field_namest   oned_asR+   t	   _var_nameRQ   t   _var_is_global(   R.   t   file_writer(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR'     s    	c         C` s    |  j  j | j d d   d  S(   Nt   ordert   F(   R   R   t   tostring(   R.   t   arr(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   write_bytes  s    c         C` s   |  j  j |  d  S(   N(   R   R   (   R.   t   s(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   write_string  s    c         C` s   | d k r# t | j j d } n  | j j t k rJ | j   j   } n  | j | j	 } | d k r| |  j
 | | |  n |  j | | |  d S(   s    write tag and data i   i   N(   R+   R   R   t   strt	   byteorderR   t   byteswapt   newbyteordert   sizeR   t   write_smalldata_elementt   write_regular_element(   R.   R   RT   RU   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   write_element  s    c         C` sK   t  j d t  } | d >| | d <| j d d  | d <|  j |  d  S(   Ni   t   byte_count_mdtypeR   R   t   data(    (   R   t   zerost   NDT_TAG_SMALLR   R   (   R.   R   RT   RU   t   tag(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s    c         C` so   t  j d t  } | | d <| | d <|  j |  |  j |  | d } | rk |  j j d d |  n  d  S(   NRT   RU   i   t    (    (   R   R   t   NDT_TAG_FULLR   R   R   (   R.   R   RT   RU   R   t   bc_mod_8(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s    


i    c   
      C` s  |  j  } |  j } |  j j   |  _ |  j |  j  t j d t	  } t
 | d <d | d <| d >| d >B| d >B}	 | |	 d >B| d <| | d <|  j |  |  j t j | d	 d
  t j |  } | d k r |  j | t d  n |  j | t  d |  _  t |  _ d S(   s   Write header for given data options
        shape : sequence
           array shape
        mclass      - mat5 matrix class
        is_complex  - True if matrix is complex
        is_logical  - True if matrix is logical
        nzmax        - max non zero elements for sparse arrays

        We get the name and the global flag from the object, and reset
        them to defaults after we've used them
        t	   data_typei   RU   i   i   i   t   flags_classt   nzmaxR   t   i4R`   i    N(    (   R   R   R   RO   t   _mat_tag_posR   t   mat_tagR   R   t   NDT_ARRAY_FLAGSR   R   R   t   asarrayR   R   RQ   (
   R.   R{   Ry   t
   is_complexRw   R   Re   Rj   t   aft   flags(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   write_header  s$    		


	c         C` sy   |  j  j   } |  j  j |  | | d } | d k rH t d   n  | |  j d <|  j |  j  |  j  j |  d  S(   Ni   i   i    s-   Matrix too large to save with Matlab 5 formatRU   I       (   R   RO   R:   R   R   R   (   R.   t	   start_post   curr_posRU   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   update_matrix_tag.  s    c         C` s#   | |  _  | |  _ |  j |  d S(   s   Write variable at top level of mat file

        Parameters
        ----------
        arr : array_like
            array-like object to create writer for
        name : str, optional
            name as it will appear in matlab workspace
            default is empty string
        is_global : {False, True}, optional
            whether variable will be global on load into matlab
        N(   R   R   R   (   R.   R   Re   Rj   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt	   write_top9  s    		c         C` s_  |  j  j   } t j j |  r? |  j |  |  j |  d St |  } | d k rv t	 d | t
 |  f   n  t | t  r |  j |  n t | t  r t d   n | t k r |  j   n | j j r |  j |  nf | j j r|  j |  nJ | j j d k rA|  j r(d } n d } |  j | |  n |  j |  |  j |  d S(	   s    Write `arr` to stream at top and sub levels

        Parameters
        ----------
        arr : array_like
            array-like object to create writer for
        Ns'   Could not convert %s (type %s) to arrays   Cannot write matlab functionst   Ut   St   UTF8t   ascii(   R   R   (   R   RO   t   scipyt   sparset   issparset   write_sparseR   R   R+   RR   R   Rb   R   t   write_objectR   R   R   t   write_empty_structR   t   fieldst   write_structt	   hasobjectt   write_cellst   kindR   t
   write_chart   write_numeric(   R.   R   t   mat_tag_posR   t   codec(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR   M  s4    			c         C` s   | j  j d k } | j  j d k } y t | j  j d } WnV t k
 r | rd | j d  } n' | r| | j d  } n | j d  } t } n X|  j t | |  j	  | d | d | | r |  j
 | j  |  j
 | j  n |  j
 |  d  S(	   Nt   ct   bi   t   c128t   i1t   f8R   Rw   (   R   R   R   R   t   KeyErrort   astypeR"   R   R   R   R   t   realt   imag(   R.   R   t   imagft   logifRy   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR   u  s&    
R   c      	   C` s<  | j  d k s$ t j | d k  rg d t j | j d g  } |  j | t  |  j | t d  d St	 |  } | j
 } |  j | t  | j j d k r%| j  r%t j |  } t j d d d t | |  d | j j    } | j   j |  } t j d t |  f d d	 d |  } n  |  j | d
 t d S(   s5    Write string array `arr` with given `codec`
        i    R`   i   NR   R{   R   t   buffert   S1RT   (   i    (    (   R   R   t   allt   maxt   ndimR   R    R   R   R   R{   R   R   t   productR   R   t   Tt   copyRD   t   encodeRm   R   (   R.   R   R   R{   t   n_charst   st_arrt   st(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s$    $
	c      
   C` s   | j    } | j   | j j d k } | j j d k } | j } |  j t | |  j  t d | d | d | d k r| d n | |  j	 | j
 j d   |  j	 | j j d   |  j	 | j j  | r |  j	 | j j  n  d	 S(
   s     Sparse matrices are 2D
        R   R   R   Rw   R   i    i   R   N(   t   tocsct   sort_indicesR   R   t   nnzR   R   R   R!   R   t   indicesR   t   indptrR   R   R   (   R.   R   t   AR   Rw   t   nz(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s    
	c         C` sV   |  j  t | |  j  t  t j |  j d  } x | D] } |  j |  q; Wd  S(   NR   (   R   R   R   R   R   t
   atleast_2dt   flattenR   (   R.   R   R  t   el(    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s
    c         C` sR   |  j  d t  |  j t j d d t j  |  j t j g  d t j  d  S(   Ni   R   (   i   i   (   R   R   R   R   R   t   int32t   int8(   R.   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s    c         C` s-   |  j  t | |  j  t  |  j |  d  S(   N(   R   R   R   R   t   _write_items(   R.   R   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s    c   	      C` s  g  | j  j D] } | d ^ q } t g  | D] } t |  ^ q-  d } |  j r[ d p^ d } | | k r t d | d   n  |  j t j | g d d  |  j t j | d d | d	 t	 t j
 |  j d
  } x0 | D]( } x | D] } |  j | |  q Wq Wd  S(   Ni    i   i@   i    s+   Field names are restricted to %d charactersR   R   s   S%dRT   R   (   R   t   descrR   Rm   R   RN   R   R   R   R   R
  R  R   (	   R.   R   t   ft
   fieldnamest	   fieldnamet   lengtht
   max_lengthR  R  (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR    s    #)c         C` sR   |  j  t | |  j  t  |  j t j | j d d d t |  j	 |  d S(   sm   Same as writing structs, except different mx class, and extra
        classname element after header
        R   R   RT   N(
   R   R   R   R   R   R   R   t	   classnameR   R  (   R.   R   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s
    (    N(   R~   R   R   R   R   R   R   R   R'   R   R   R+   R   R   R   RQ   R   R   R   R   R   R   R   R   R   R   R  R   (    (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR     s.   
						&			(	+					t   MatFile5Writerc           B` sA   e  Z d  Z e e e d e d d   Z d   Z d d  Z RS(   s    Class for writing mat5 files t   rowc         C` sU   | |  _  | |  _ | |  _ | r- | |  _ n	 g  |  _ | |  _ | |  _ d |  _ d S(   s<   Initialize writer for matlab 5 format files

        Parameters
        ----------
        %(do_compression)s
        %(unicode_strings)s
        global_vars : None or sequence of strings, optional
            Names of variables to be marked as global for matlab
        %(long_fields)s
        %(oned_as)s
        N(   R   t   do_compressionR   t   global_varsR   R   R+   t   _matrix_writer(   R.   R   R  R   R  R   R   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR'      s    						c         C` s~   t  j d t  } d t j t j   f | d <d | d <t  j d d d d d t  j d	   | d
 <|  j	 j
 | j    d  S(   Ns0   MATLAB 5.0 MAT-file Platform: %s, Created on: %sR@   i   RB   R{   R   t   S2R   iIM  t   endian_test(    (    (   R   R   t   NDT_FILE_HDRt   osRe   t   timet   asctimeR   t   uint16R   R   R   (   R.   RH   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   write_file_header  s    
c   	      C` sL  | d k r$ |  j j   d k } n  | r7 |  j   n  t |   |  _ x | j   D] \ } } | d d k ru qS n  | |  j k } |  j r(t	   } | |  j _ |  j j
 | t |  |  t j | j    } t j d t  } t | d <t |  | d <|  j j | j    |  j j |  qS |  j j
 | t |  |  qS Wd S(   s   Write variables in `mdict` to stream

        Parameters
        ----------
        mdict : mapping
           mapping with method ``items`` returns name, contents pairs where
           ``name`` which will appear in the matlab workspace in file load, and
           ``contents`` is something writeable to a matlab file, such as a numpy
           array.
        write_header : {None, True, False}, optional
           If True, then write the matlab file header before writing the
           variables.  If None (the default) then write the file header
           if we are at position 0 in the stream.  By setting False
           here, and setting the stream position to the end of the file,
           you can append variables to a matlab file
        i    R   RT   RU   N(    (   R+   R   RO   R#  R   R  R   R  R  R   R   R   t   zlibt   compresst   getvalueR   t   emptyR   R   Rm   R   R   (	   R.   Ro   R   Re   t   varRj   RW   t   out_strR   (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   put_variables(  s(    		
N(	   R~   R   R   R
   RQ   R+   R'   R#  R*  (    (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyR    s   	(C   R   t
   __future__R    R   R   R  R   R(   R$  t   ioR   Rf   t   numpyR   t   numpy.compatR   R   t   scipy.sparseR   t   scipy._lib.sixR   t   byteordercodesR   R   t   miobaseR	   R
   R   R   R   R   R   R   R   t
   mio5_utilsR   t   mio5_paramsR   R   R   R   R   R   R   R   R   R   R   R   R   R    R!   R"   R#   t   streamsR$   R%   R   R   R   R   R  R   R   R   R   R  (    (    (    s3   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/mio5.pyt   <module>   s6   B@p	E	1 0