3
Od.                 @   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jdeee	gdd Zdd	 Ze jjd
eee	gdd Ze j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| 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/html/virt/lib64/python3.6/site-packages/scipy/integrate/_ivp/tests/test_rk.pytest_coefficient_properties   s    r   c               C   s6   t tjtjddd t tjtjddtjdd d S )Nr	   gV瞯<)r
   )r   g+=)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|j|}|jtj|g }ttj|tj|k  d S )Ng?c             S   s   |S )Nr   )tyr   r   r   <lambda>   s    z'test_error_estimation.<locals>.<lambda>r   r	   )
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|j|dgd}tj|sFtd S )	Ng?c             S   s   d| S )Ny              ?r   )r   r   r   r   r   r   "   s    z/test_error_estimation_complex.<locals>.<lambda>r   y              ?r	   )r   )Zscale)r   Z_estimate_error_normr   r   Z	isrealobjAssertionError)r   hr   Zerr_normr   r   r   test_error_estimation_complex   s
    r"   )ZpytestZnumpy.testingr   r   Znumpyr   Zscipy.integrater   r   r   Zscipy.integrate._ivpr   markZparametrizer   r   r   r"   r   r   r   r   <module>   s   
