o
    j                     @   s  d dl Zd dlZd dlmZ d dlmZ d dlmZ e	dZ
e
r&e
d ejddd	d
 Zed dgddggejZeejd ZeejZed Zed Zed Zg dZerbed dd Zdd Zdd Zdd Zdd Zdd Z d d! Z!d"d# Z"dS )$    N)io)expected_warnings)is_wasmzmatplotlib.pyplotZAggT)Zautousec                   C   s   t   d S )N)r   Zreset_plugins r   r   a/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/skimage/io/tests/test_mpl_imshow.py_reset_plugins   s   r   @               i  
   )z'tight_layout : falling back to Agg|\A\Zznp.asscalar|\A\Zz+The figure layout has changed to tight|\A\ZzDis deprecated since version 0.25.* Please use .* to visualize imagesz-Use imageio or a similar package instead|\A\ZzUPickle, copy, and deepcopy support will be removed from itertools in Python 3.14|\A\Zc                 C   s   t |   S )a  Return the number of subplots in the figure containing an ``AxesImage``.

    Parameters
    ----------
    ax_im : matplotlib.pyplot.AxesImage object
        The input ``AxesImage``.

    Returns
    -------
    n : int
        The number of subplots in the corresponding figure.

    Notes
    -----
    This function is intended to check whether a colorbar was drawn, in
    which case two subplots are expected. For standard imshows, one
    subplot is expected.
    )lenZ
get_figureZget_axesax_imr   r   r   
n_subplots,   s   r   c                  C   |   t   tt tt} W d    n1 sw   Y  | jjdks%J | 	 dks-J t
| dks5J | jd u s<J d S )Ngray)r   r      )pltfigurer   imshow_expected_warningsr   imshowim8cmapnameget_climr   colorbarr   r   r   r   
test_uint8B      
r   c                  C   r   )Nr   )r   i  r   )r   r   r   r   r   r   im16r   r   r   r   r   r   r   r   r   test_uint16L   r   r!   c                  C   r   )Nr   )r   r   r   )r   r   r   r   r   r   imfr   r   r   r   r   r   r   r   r   
test_floatV   r   r#   c                  C   sf   t tdg  tt} W d    n1 sw   Y  |  t t fks*J | jd us1J d S )NLow image data range)	r   r   r   r   im_lor   minmaxr   r   r   r   r   test_low_data_range`   s
   r(   c                  C   ~   t   ttdg  tt} W d    n1 sw   Y  |  t t	 fks.J t
| dks6J | jd us=J d S )Nzout of standard range   )r   r   r   r   r   r   im_hir   r&   r'   r   r   r   r   r   r   test_outside_standard_rangeh      r,   c                  C   r)   )Nr$   r*   )r   r   r   r   r   r   im64r   r&   r'   r   r   r   r   r   r   test_nonstandard_typeq   r-   r/   c                  C   s   t   tddgddgg} tt t| }W d    n1 s#w   Y  | dks0J t	|dks8J |j
d us?J d S )N      gɿg?g?)r0   g      ?r*   )r   r   nparrayr   r   r   r   r   r   r   )Z	im_signedr   r   r   r   test_signed_imagez   s   
r3   )#numpyr1   ZpytestZskimager   Zskimage._shared._warningsr   Z"skimage._shared._dependency_checksr   Zimportorskipr   Zswitch_backendZfixturer   r2   Zuint8r   ZastypeZuint16r    Zuint64r.   r"   r%   r+   r   appendr   r   r!   r#   r(   r,   r/   r3   r   r   r   r   <module>   s:    







		