3
Pd                 @   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   sf   t jd} tt j| t|  tt jdtd}tt|t tt jdd	gd}tt|t j d S )
N      )dtypef1f)r   r   )r   r   )r   r   )r	   r
   )	npZzerosr   Zsqueezer   floatr   
isinstanceZndarray)aZsq_intZsq_sa r   X/var/www/html/virt/lib64/python3.6/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|| |jd}|jd}tt|| |jd}|j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U6)r   c             S   s   g | ]}t |qS r   )list).0sr   r   r   
<listcomp>   s    z&test_chars_strings.<locals>.<listcomp>ZU1      r   F)r   order )r   r   r   )r   r   )r   r   r   r   )r   r   r   )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__Znumpyr   Znumpy.testingr   r   Zscipy.io.matlab.mio_utilsr   r   r   r   r   r   r   r   <module>   s
   