
    ^Mh                     d    d dl Zd dlmZmZ d dlmc mZ  G d d          Z	 G d d          Z
dS )    N)assert_allcloseassert_equalc                       e Zd Zd Zd ZdS )	TestDGEMMc                    t          j        dd                              d          d dd df         }t          j        ddd                              d          d dd df         }t          j        d	          d dd df         }t	          j        d
||d|           t          ||                    |                     t	          j        d
|j        |d|           t          ||j                            |                     t	          j        d
||j        d|           t          ||                    |j                             t	          j        d
|j        |j        d|           t          ||j                            |j                             t	          j        d
||d|j                   t          ||                    |          j                   t	          j        d
|j        |d|j                   t          ||j                            |          j                   t	          j        d
||j        d|j                   t          ||                    |j                  j                   t	          j        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cs       c/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/scipy/linalg/tests/test_cython_blas.pytest_transposeszTestDGEMM.test_transposes   sX   Ib$$$,,V44RaRU;Ia3'''//772A2>HVRaRU#Q2q)))15588$$$QS!R+++13771::&&&QR+++155::&&&QS!#r1---137713<<(((Q2qs+++15588:&&&QS!R---13771::<(((QR---155::<(((QS!#r13///137713<<>*****    c                    t          j        dd                              d          }t          j        ddd                              d          }t          j        d          }t	          j        d	||d
|           t          ||                    |                     t	          j        d	|j        |j        d
|j                   t          ||j                            |j                  j                   d S )N   r	   r
   )r   r   ir   r   r   r   r   r   r   s       r#   test_shapeszTestDGEMM.test_shapes&   s    Ias###++F33Ib!3'''//77HVQ2q)))15588$$$QS!#r13///137713<<>*****r%   N)__name__
__module____qualname__r$   r(    r%   r#   r   r      s2        + + +<	+ 	+ 	+ 	+ 	+r%   r   c                   *    e Zd ZdZd Zd Zd Z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           	      b   t          j        g dt           j                  }t          j        g dt           j                  }t          t	          j        ||          d           t          t	          j        ||          d           t          t	          j        |          d           t          t	          j	        |          d           t          t	          j
        |          d           t          t	          j        |d d d         |d d d                   d	           t          t	          j        |d d d         |d d d                   d
           t          t	          j	        |d d d                   d           t          t	          j
        |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cys      r#   test_complex_argsz#TestWfuncPointers.test_complex_args6   s   X9992<HHX9992<HH(R005	7 	7 	7(R005	7 	7 	7 	T&r**A...)"--v666)"--}===(CCaC"SSqS'::5	7 	7 	7(CCaC"SSqS'::5	7 	7 	7)"SSqS'22C888)"SSqS'22MBBBBBr%   c           	         t          j        g dt           j                  }t          j        g dt           j                  }t          t	          j        |          d           t          t	          j        ||          d           t          t	          j        |          d           t          t	          j        |d d d                   d           t          t	          j        |d d d         |d d d                   d           t          t	          j        |d d d                   d	           t          t	          j	        |          d
           d S )Ng      @g      ࿩r   r   g      ?      !@      @ `h@r         @     #@J @@r   )
r   r4   float64r   r   _test_dasum
_test_ddot_test_dnrm2r   _test_idamaxr   xys      r#   test_double_argsz"TestWfuncPointers.test_double_argsL   s   H]]]BJ//HZZZ,,(++S1111--t444(++];;;(33Q300#666##A###A#77>>>(33Q300,???T&q))1-----r%   c           	         t          j        g dt           j                  }t          j        g dt           j                  }t          t	          j        |          d           t          t	          j        |          d           t          t	          j        ||          d           t          t	          j	        |          d           t          t	          j        |d d d                   d           t          t	          j        |d d d         |d d d                   d	           t          t	          j	        |d d d                   d
           d S )Nr@   rB   r   rC   rD   rE   r   rF   rG   rH   )
r   r4   float32r   r   _test_isamaxr   _test_sasum
_test_sdot_test_snrm2rN   s      r#   test_float_argsz!TestWfuncPointers.test_float_args[   s   H]]]BJ//HZZZ,,T&q))1---(++S1111--t444(++];;;(33Q300#666##A###A#77>>>(33Q300,?????r%   c           	      .   t          j        g dt           j                  }t          j        g dt           j                  }t          t	          j        |          d           t          t	          j        ||          d           t          t	          j        ||          d           t          t	          j        |d d d         |d d d                   d           t          t	          j        |d d d         |d d d                   d           d S )	N)r0   r1   y      *@      )y      ?       @r2   r3   r   y     2     L6@y     P     d?@r   y     2      6@y     @     ?@)	r   r4   
complex128r   r   _test_izamaxr   _test_zdotc_test_zdotur;   s      r#   test_double_complex_argsz*TestWfuncPointers.test_double_complex_argsj   s    X888"-HHX;;;R]KKT&r**A...(R002GHHH(R002FGGG(CCaC"SSqS'::<LMMM(CCaC"SSqS'::OLLLLLr%   N)r)   r*   r+   __doc__r>   rQ   rX   r^   r,   r%   r#   r.   r.   1   se         C C C,. . .@ @ @M M M M Mr%   r.   )numpyr   numpy.testingr   r   scipy.linalg.cython_blaslinalgcython_blasr   r   r.   r,   r%   r#   <module>re      s       ) ) ) ) ) ) ) ) ' ' ' ' ' ' ' ' ')+ )+ )+ )+ )+ )+ )+ )+VDM DM DM DM DM DM DM DM DM DMr%   