
    sg.                     (   d dl Z d dlmZmZ d dlZd dlmZmZm	Z	 d dl
mZ e j                  j                  deee	g      d        Zd Ze j                  j                  deee	g      d	        Ze j                  j                  deee	g      d
        Zy)    N)assert_allcloseassert_)RK23RK45DOP853)dop853_coefficientssolverc                     t        t        j                  | j                        dd       t        t        j                  | j                  d      | j
                  d       y N   gV瞯<)rtol)axisg+=)r   npsumBAC)r	   s    U/var/www/html/venv/lib/python3.12/site-packages/scipy/integrate/_ivp/tests/test_rk.pytest_coefficient_propertiesr      s:    BFF688$ae4BFF688!,fhhUC    c                      t        t        j                  t        j                        dd       t        t        j                  t        j
                  d      t        j                  d       y r   )r   r   r   r   r   r   r    r   r   "test_coefficient_properties_dop853r      sF    BFF.00115ABFF.00q9')) r   solver_classc                 ,   d} | d ddgd|      }|j                          |j                  |j                  |      }|j                  t	        j
                  |g      z
  }t        t	        j                  |      t	        j                  |      k         y )N皙?c                     |S )Nr   tys     r   <lambda>z'test_error_estimation.<locals>.<lambda>   s    q r   r   r   
first_step)step_estimate_errorKr    r   expr   abs)r   r$   r	   error_estimateerrors        r   test_error_estimationr+      sp    D.!aS!EF
KKM++FHHd;NHHrvvtf~%EBFF5MBFF>223r   c                     d} | d ddgd|      }|j                          |j                  |j                  |dg      }t        j                  |      sJ y )Nr   c                     d|z  S )N              ?r   r   s     r   r!   z/test_error_estimation_complex.<locals>.<lambda>"   s
    rAv r   r   r.   r   r"   )scale)r$   _estimate_error_normr&   r   	isrealobj)r   hr	   err_norms       r   test_error_estimation_complexr4      sT    A-q2$aHF
KKM**688Qqc*BH<<!!!r   )pytestnumpy.testingr   r   numpyr   scipy.integrater   r   r   scipy.integrate._ivpr   markparametrizer   r   r+   r4   r   r   r   <module>r<      s     2  . . 4 D$#78D 9D
  $f)=>4 ?4 $f)=>" ?"r   