a
    Re.                     @   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瞯<)Zrtol)Zaxisg+=)r   npsumBAC)r    r   V/var/www/sunrise/env/lib/python3.9/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>       z'test_error_estimation.<locals>.<lambda>r   r
   Z
first_step)stepZ_estimate_errorKr   r   expr   abs)r   r   r   Z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|sFJ d S )	Nr   c                 S   s   d| S )N              ?r   r   r   r   r   r   "   r   z/test_error_estimation_complex.<locals>.<lambda>r   r"   r
   r   )Zscale)r   Z_estimate_error_normr   r   Z	isrealobj)r   hr   Zerr_normr   r   r   test_error_estimation_complex   s
    r$   )ZpytestZnumpy.testingr   r   numpyr   Zscipy.integrater   r   r   Zscipy.integrate._ivpr   markZparametrizer   r   r!   r$   r   r   r   r   <module>   s   

	