
    >qjc                     P    d dl mZ d dlmZ d dlmZ  G d d      Z G d d      Zy)	    )assert_allclose)cython_lapack)lapackc                       e Zd Zd Zd Zd Zy)	TestLamchc                     t        j                  ddd      }dD ]'  }t        t        j                  |       ||             ) y )Nlamchfloat32	preferreddtypeilp64
   e   s   b   p   n   r   m   u   l   o)r   get_lapack_funcsr   r   _test_slamch)selflapack_slamchcs      d/opt/rentech/trading_bot/.venv/lib/python3.12/site-packages/scipy/linalg/tests/test_cython_lapack.pytest_slamchzTestLamch.test_slamch   sH    //9K
 N 	.AM66q9)!,.	.    c                     t        j                  ddd      }dD ]'  }t        t        j                  |       ||             ) y )Nr	   float64r   r   r   )r   r   r   r   _test_dlamch)r   lapack_dlamchr   s      r   test_dlamchzTestLamch.test_dlamch   sH    //9K
 N 	.AM66q9)!,.	.r!   c                     d}d}t        t        j                  ||      d       t        t        j                  ||      d       y )Ny      ?      ?y      ?       @y333333??)r   r   _test_zladiv_test_cladiv)r   cxcys      r   test_complex_ladivzTestLamch.test_complex_ladiv   s:    222r:IF222r:IFr!   N)__name__
__module____qualname__r    r&   r,    r!   r   r   r      s    ..Gr!   r   c                       e Zd ZdZd Zy)TestBlasInta9  Test for blas_int/blas_bint types used in cython_blas/cython_lapack.

    Note similar test is in test_blas.py: both cython_blas.pyx and cython_lapack.pyx
    define the types, so we smoke test that `blas_int` and `blas_bint` types
    can be cimported from both `cython_blas` and `cython_lapack` extensions.
    c                     ddl m} t        j                         }|d   d   d   }|r|dk(  sJ d| d       |d	k(  sJ d
| d       t        j                         }|r|dk(  sJ y|dk(  sJ y)zDVerify blas_int and blas_bint sizes matches the build configuration.r   )CONFIGzBuild Dependenciesblaszcython blas ilp64   zILP64 build but blas_int is z bytes   zLP64 build but blas_int is )r6   r7   )r7   r7   N)scipy.__config__r4   r   _blas_int_size_blas_bint_bint_sizes)r   r4   sizecython_blas_ilp64
bint_sizess        r   test_blas_int_sizezTestBlasInt.test_blas_int_size(   s    +++-"#78@ATU19I <TF&II919H ;D6HH9 #88:
''''''r!   N)r-   r.   r/   __doc__r>   r0   r!   r   r2   r2       s    (r!   r2   N)numpy.testingr   scipy.linalgr   r   r   r2   r0   r!   r   <module>rB      s$    ) 7 G G4( (r!   