
    Ui.                     6   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                            deee	g          d             Zd Ze j                            deee	g          d	             Ze j                            deee	g          d
             ZdS )    N)assert_allcloseassert_)RK23RK45DOP853)dop853_coefficientssolverc                     t          t          j        | j                  dd           t          t          j        | j        d          | j        d           d S N   gV瞯<)rtol)axisg+=)r   npsumBAC)r	   s    z/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/scipy/integrate/_ivp/tests/test_rk.pytest_coefficient_propertiesr      sQ    BF68$$ae4444BF68!,,,fhUCCCCCC    c                      t          t          j        t          j                  dd           t          t          j        t          j        d          t          j        d           d S r   )r   r   r   r   r   r   r    r   r   "test_coefficient_properties_dop853r      sd    BF.01115AAAABF.0q999')           r   solver_classc                 4   d} | d ddgd|          }|                                  |                    |j        |          }|j        t	          j        |g          z
  }t          t	          j        |          t	          j        |          k                d S )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+      s    D\..!aS!EEEF
KKMMM++FHd;;NHrvtf~~%EBF5MMBF>22233333r   c                     d} | d ddgd|          }|                                  |                    |j        |dg          }t          j        |          sJ d S )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      sn    A\--q2$aHHHF
KKMMM**68Qqc*B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 2 2 2 2 2 2 2     . . . . . . . . . . 4 4 4 4 4 4 D$#788D D 98D
      $f)=>>4 4 ?>4 $f)=>>" " ?>" " "r   