o
    h.                     @   s   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d Zdd	 Ze jd
eee	gdd Ze jd
eee	gdd ZdS )    N)assert_allcloseassert_)RK23RK45DOP853)dop853_coefficientssolverc                 C   s6   t t| jddd t tj| jdd| jdd d S N   gV瞯<)rtol)axisg+=)r   npsumBAC)r    r   V/var/www/vscode/kcb/lib/python3.10/site-packages/scipy/integrate/_ivp/tests/test_rk.pytest_coefficient_properties   s    r   c                   C   s6   t ttjddd t tjtjddtjdd d S r	   )r   r   r   r   r   r   r   r   r   r   r   "test_coefficient_properties_dop853   s
   
r   solver_classc                 C   s`   d}| dd ddgd|d}|   ||j|}|jt|g }tt|t|k  d S )N皙?c                 S   s   |S )Nr   tyr   r   r   <lambda>   s    z'test_error_estimation.<locals>.<lambda>r   r
   
first_step)step_estimate_errorKr   r   expr   abs)r   r   r   error_estimateerrorr   r   r   test_error_estimation   s   r%   c                 C   sJ   d}| dd ddgd|d}|   |j|j|dgd}t|s#J d S )	Nr   c                 S   s   d| S )N              ?r   r   r   r   r   r   "   s    z/test_error_estimation_complex.<locals>.<lambda>r   r&   r
   r   )scale)r   _estimate_error_normr    r   	isrealobj)r   hr   err_normr   r   r   test_error_estimation_complex   s
   r,   )pytestnumpy.testingr   r   numpyr   scipy.integrater   r   r   scipy.integrate._ivpr   markparametrizer   r   r%   r,   r   r   r   r   <module>   s    

	