
    tKg	                         d Z ddlZddlmZ g 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%dZ&i ededede	de
dededededed edededd!g d"d#d$d%gd&d'd(gd)g d*d+d+iZ'edededede de!de"de#d ededi
Z(i ed,ed-ed.ed/e d0e!d1e"d2e#d3ed4ed5ed6ed7ed8ed9ed:e$d;e%d<Z)i ded=ed>ed?eded@edede
deded edede	dedAed+edBeZ*i ded=ed>ed?eded@ede"de deded e#de!dededAedBeZ+	 edCddDedEddDedFddDiZ,dG Z-i Z.dHD ]"  Z/ ee'e/       ee(e/       e-e,e/      dIZ0e0e.e/<   $  G dJ dK      Z1 G dL dMejd                        Z3 G dN dOejd                        Z4 G dP dQejd                        Z5 ejl                  g dR      Z7y)Sz 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
    N   )convert_dtypes)-MDTYPESMatlabFunctionMatlabObjectMatlabOpaqueNP_TO_MTYPESNP_TO_MXTYPESOPAQUE_DTYPEcodecs_template
mat_structmclass_dtypes_templatemclass_infomdtypes_templatemiCOMPRESSEDmiDOUBLEmiINT16miINT32miINT64miINT8miMATRIXmiSINGLEmiUINT16miUINT32miUINT64miUINT8miUTF16miUTF32miUTF8mxCELL_CLASSmxCHAR_CLASSmxDOUBLE_CLASSmxFUNCTION_CLASSmxINT16_CLASSmxINT32_CLASSmxINT64_CLASSmxINT8_CLASSmxOBJECT_CLASSmxOBJECT_CLASS_FROM_MATRIX_HmxOPAQUE_CLASSmxSINGLE_CLASSmxSPARSE_CLASSmxSTRUCT_CLASSmxUINT16_CLASSmxUINT32_CLASSmxUINT64_CLASSmxUINT8_CLASS                  	                           
      i1u1i2u2i4u4f4f8i8u8file_header))descriptionS116)subsystem_offsetrK   )versionrF   )endian_testS2tag_full)mdtyperH   
byte_countrH   tag_smalldata)byte_count_mdtyperH   )dataS4array_flags))	data_typerH   rV   )flags_classrH   )nzmaxrH   U1int8uint8int16uint16int32uint32int64uint64singledoublecellstructobjectcharsparsefunctionopaquec32c24c16c8S1b1utf_8)codecwidthutf_16utf_32c                     i }|dk(  xr dxs d}| j                         D ].  \  }}|d   }	 dj                  |       |d   dkD  r||z  }|||<   0 |j                         S # t        $ r d||<   Y Qw xY w)	a   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))
    <_le_bery    Nrz   r   )itemsencodeLookupErrorcopy)template
byte_ordercodecspostfixkvry   s          `/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/scipy/io/matlab/_mio5_params.py_convert_codecsr      s    $ FC)E2UG 1'
	JJu W:>WEq	 ! ;;=  	F1I	s   A!!A21A2z<>)dtypesclassesr   c                       e Zd ZdZy)r   zPlaceholder 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.loadmat` function.
    N)__name__
__module____qualname____doc__     r   r   r      s    
 	r   r   c                       e Zd ZdZddZd Zy)r   zSubclass of ndarray to signal this is a matlab object.

    This is a simple subclass of :class:`numpy.ndarray` meant to be used
    by :func:`scipy.io.loadmat` and should not be instantiated directly.
    Nc                 \    t        j                  |      j                  |       }||_        |S N)npasarrayview	classname)clsinput_arrayr   objs       r   __new__zMatlabObject.__new__   s)     jj%**3/!
r   c                 (    t        |dd       | _        y )Nr   )getattrr   )selfr   s     r   __array_finalize__zMatlabObject.__array_finalize__   s     k48r   r   )r   r   r   r   r   r   r   r   r   r   r      s    9r   r   c                       e Zd ZdZd Zy)r   zSubclass for a MATLAB function.

    This is a simple subclass of :class:`numpy.ndarray` meant to be used
    by :func:`scipy.io.loadmat` and should not be directly instantiated.
    c                 N    t        j                  |      j                  |       }|S r   r   r   r   r   r   r   s      r   r   zMatlabFunction.__new__       jj%**3/
r   Nr   r   r   r   r   r   r   r   r   r          r   r   c                       e Zd ZdZd Zy)r   zSubclass for a MATLAB opaque matrix.

    This is a simple subclass of :class:`numpy.ndarray` meant to be used
    by :func:`scipy.io.loadmat` and should not be directly instantiated.
    c                 N    t        j                  |      j                  |       }|S r   r   r   s      r   r   zMatlabOpaque.__new__  r   r   Nr   r   r   r   r   r     r   r   r   ))s0O)s1r   )s2r   )arrr   )8r   numpyr   _miobaser   __all__r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r-   r(   r!   r,   r"   r+   r'   r1   r$   r.   r%   r/   r&   r0   r#   r*   r)   r   r   r   r	   r
   r   r   r   	_bytecode_defr   ndarrayr   r   r   dtyper   r   r   r   <module>r      s    $ 




	


     " 
DT T d	
 T d d d T d D T T  +$ !#78%& 0.A'(  %)0 	$1 8 $44D4D4DDD &7 7 H	
 7 H 7 H H H & H H & H  j!" H#((	8 
8 
8	
 	( 	( 	' 	' 	' 	& 	( 	( 	( 	' 	'  	'!" 	'#*.	> 
> 
>	
 	. 	. 	- 	- 	- 	, 	. 	. 	. 	- 	-  	-!&B g*x!,x+B I$%5yA%&<iH%oyACD GI	 	 	92:: 9,	RZZ 		2:: 	 rxx9;r   