U
    ?h:                     @   s@   d Z ddlZddlmZmZ ddlmZmZ dd Z	dd Z
dS )	z
 Testing

    N)assert_array_equalassert_)squeeze_elementchars_to_stringsc                  C   s   t d} tt | t|  tt jdtd}tt|t tt jddgd}tt|t j tt 	dt j
}|jt j
kstd S )N)      )r   r   dtype)f1fr   )npZzerosr   Zsqueezer   floatr   
isinstanceZndarrayemptyZuint8r	   AssertionError)aZsq_intZsq_saZsq_empty r   V/var/www/html/venv/lib/python3.8/site-packages/scipy/io/matlab/tests/test_mio_utils.pytest_squeeze_element   s    
r   c                  C   s   ddddg} t j| dd}dd | D }t j|d	d}tt|| |d
}|d}tt|| |d}|d}tt|| t j|d	dd}tt|| t jdggd	d}	t jdgd	d}
tt|	|
 d S )Nzlearn pythonzfast  zhere  ZU6r   c                 S   s   g | ]}t |qS r   )list).0sr   r   r   
<listcomp>   s     z&test_chars_strings.<locals>.<listcomp>ZU1)   r      )r   r   )r   r   r   r   )r   r   r   F)r	   order )r   arrayr   r   Zreshape)stringsZstr_arrcharsZchar_arrZca2dZsa2dZca3dZsa3dZ	char_arrfZarrZout_arrr   r   r   test_chars_strings   s     



r"   )__doc__numpyr   Znumpy.testingr   r   Zscipy.io.matlab._mio_utilsr   r   r   r"   r   r   r   r   <module>   s
   