U
    Gvfe  ã                   @   s$   d Z ddlmZmZmZ dd„ ZdS )zl
Here we perform some symbolic computations required for the N-D
interpolation routines in `interpnd.pyx`.

é    )ÚsymbolsÚbinomialÚMatrixc                  C   sX  t dddddgƒ\} }}}}| |d|   d |d|  d |g}d}tdƒD ]2}|td|ƒ||  ||  d	| d|   7 }qL| |d
¡ ¡ }|d
  |dd	f¡ ¡ }	t|	 |d
 ¡|	 || ¡d
 g|	 || ¡d
 |	 |d
 ¡ggƒ}
t|	 |¡ |d¡g|	 |¡ |d¡ggƒd
 }t	dƒ t	|
ƒ t	dƒ t	|ƒ t	dƒ t	|
 
¡ | ƒ d S )NÚf1Úf2Údf1Údf2Úxé   r   é   é   é   ÚAÚBZsolution)r   Úranger   ZdiffÚexpandZ	integrater   ZcoeffÚsubsÚprintÚinv)r   r   r   r   r	   ÚcÚwÚkZwppZintwpp2r   r   © r   úD/tmp/pip-unpacked-wheel-96ln3f52/scipy/interpolate/_interpnd_info.pyÚ_estimate_gradients_2d_global	   s*    $0 ÿÿÿr   N)Ú__doc__Zsympyr   r   r   r   r   r   r   r   Ú<module>   s   