o
    h                     @   sJ   d dl Zd dlmZmZ d dlm  mZ G dd dZ	G dd dZ
dS )    N)assert_allcloseassert_equalc                   @   s   e Zd Zdd Zdd ZdS )	TestDGEMMc                 C   s  t jddddd dd df }t jdddddd dd df }t d	d dd df }td
||d| t||| td
|j|d| t||j| td
||jd| t|||j td
|j|jd| t||j|j td
||d|j t|||j td
|j|d|j t||j|j td
||jd|j t|||jj td
|j|jd|j t||j|jj d S )N   ddtype               )r   r
   r   r         ?        	nparangereshapeemptyblas_test_dgemmr   dotTselfabc r    W/var/www/vscode/kcb/lib/python3.10/site-packages/scipy/linalg/tests/test_cython_blas.pytest_transposes   s&   $&zTestDGEMM.test_transposesc                 C   s   t jdddd}t jddddd}t d}td	||d
| t||| td	|j|jd
|j t||j|jj d S )N   r   r   )r
   r   ir   r   r	   r   r   r   r   r    r    r!   test_shapes&   s   
zTestDGEMM.test_shapesN)__name__
__module____qualname__r"   r$   r    r    r    r!   r      s    r   c                   @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )TestWfuncPointersz Test the function pointers that are expected to fail on
    Mac OS X without the additional entry statement in their definitions
    in fblas_l1.pyf.src. c                 C   s   t g dt j}t g dt j}tt||d tt||d tt|d tt	|d tt
|d tt|d d d |d d d d	 tt|d d d |d d d d
 tt	|d d d d tt
|d d d d d S )N)      ?      ?      ?      ؿy      )@      )y?       @      ?                   @yI! 1?3_5@y4 fva+ P>@r
   g     2@gKg [*@r   yI! 2?335@y4 ffa+ >@g      2@g8f X*@)r   array	complex64r   r   _test_cdotc_test_cdotur   _test_icamax_test_scasum_test_scnrm2r   cxcyr    r    r!   test_complex_args6   s&     z#TestWfuncPointers.test_complex_argsc                 C   s   t g dt j}t g dt j}tt|d tt||d tt|d tt|d d d d tt|d d d |d d d d tt|d d d d	 tt	|d
 d S )Ng      @g      ࿩r   r   g      ?      !@      @ `h@r         @     #@J @@r   )
r   r-   float64r   r   _test_dasum
_test_ddot_test_dnrm2r   _test_idamaxr   xyr    r    r!   test_double_argsL   s   &z"TestWfuncPointers.test_double_argsc                 C   s   t g dt j}t g dt j}tt|d tt|d tt||d tt	|d tt|d d d d tt|d d d |d d d d	 tt	|d d d d
 d S )Nr8   r:   r   r;   r<   r=   r   r>   r?   r@   )
r   r-   float32r   r   _test_isamaxr   _test_sasum
_test_sdot_test_snrm2rF   r    r    r!   test_float_args[   s   &z!TestWfuncPointers.test_float_argsc                 C   s   t g dt j}t g dt j}tt|d tt||d tt||d tt|d d d |d d d d tt|d d d |d d d d d S )	N)r)   r*   y      *@      )y      ?       @r+   r,   r
   y     2     L6@y     P     d?@r   y     2      6@y     @     ?@)	r   r-   
complex128r   r   _test_izamaxr   _test_zdotc_test_zdotur4   r    r    r!   test_double_complex_argsj   s   &*z*TestWfuncPointers.test_double_complex_argsN)r%   r&   r'   __doc__r7   rI   rO   rT   r    r    r    r!   r(   1   s    r(   )numpyr   numpy.testingr   r   scipy.linalg.cython_blaslinalgcython_blasr   r   r(   r    r    r    r!   <module>   s
    +