a
    �¥»aÒ  ã                   @   sP   d Z ddlZddlmZ ddlmZ ddlmZ G dd„ dƒZ	G dd	„ d	ƒZ
dS )
z'Test deprecation and future warnings.

é    N)Úassert_warns)Úassert_equal)ÚMaskedArrayFutureWarningc                   @   s0   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
S )ÚTestArgsortz	 gh-8701 c                 C   s�   t  d¡ |¡}||ƒ t  g d¢¡ |¡}||ƒ t  ddgddgg¡ |¡}tt jjj||ƒ}t|||d d�ƒ ||d d� ||dd� d S )Né   )r   é   é   r   r   é   ©Zaxiséÿÿÿÿ)ÚnpÚarrayÚviewr   ÚmaÚcorer   r   )ÚselfÚargsortÚclsZarr_0dZarr_1dZarr_2dÚresult© r   úZ/home/yuhw/wc/pochoir/venv/lib/python3.9/site-packages/numpy/ma/tests/test_deprecations.pyÚ
_test_base   s    ÿzTestArgsort._test_basec                 C   s   |   tjjtj¡S ©N)r   r   r   r   Zndarray©r   r   r   r   Útest_function_ndarray   s    z!TestArgsort.test_function_ndarrayc                 C   s   |   tjjtjj¡S r   )r   r   r   r   ÚMaskedArrayr   r   r   r   Útest_function_maskedarray   s    z%TestArgsort.test_function_maskedarrayc                 C   s   |   tjjjtjj¡S r   )r   r   r   r   r   r   r   r   r   Útest_method"   s    zTestArgsort.test_methodN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r   	   s
   r   c                   @   s$   e Zd Zdd„ Zdd„ Zdd„ ZdS )ÚTestMinimumMaximumc                 C   s    t ttjjtj ddg¡ƒ d S ©Nr   r   )r   ÚDeprecationWarningr   r   Úminimumr   r   r   r   r   Útest_minimum'   s    zTestMinimumMaximum.test_minimumc                 C   s    t ttjjtj ddg¡ƒ d S r#   )r   r$   r   r   Úmaximumr   r   r   r   r   Útest_maximum*   s    zTestMinimumMaximum.test_maximumc                 C   sÄ   t j d¡}| dd¡}t jjj}t jjj}tt||ƒ}t	|||d d�ƒ tt||ƒ}t	|||d d�ƒ ||ƒ}t	|||d d�ƒ t	|||dd�ƒ ||ƒ}t	|||d d�ƒ t	|||dd�ƒ d S )Né   r   r   r
   r   )
r   r   ZarangeZreshaper%   Úreducer'   r   r   r   )r   Zdata1dZdata2dZma_minZma_maxr   r   r   r   Útest_axis_default-   s    

z$TestMinimumMaximum.test_axis_defaultN)r   r   r    r&   r(   r+   r   r   r   r   r"   &   s   r"   )r!   Únumpyr   Znumpy.testingr   Znumpy.ma.testutilsr   Znumpy.ma.corer   r   r"   r   r   r   r   Ú<module>   s   