
    9i                        S SK rS SKrS SKJr  S SKJr  S SKJr  \R                  " S5      r
\
(       a  \
R                  S5        \R                  " SS9S	 5       r\R                  " S S
/SS//\R                  5      r\R#                  \R$                  5      S-  r\R#                  \R(                  5      r\S-  r\S-  r\S-   r/ SQr\(       a  \R5                  S5        S rS rS rS rS rS r S r!S r"g)    N)io)expected_warnings)is_wasmzmatplotlib.pyplotAggT)autousec                  .    [         R                  " 5         g )N)r   reset_plugins     `/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/skimage/io/tests/test_mpl_imshow.py_reset_pluginsr      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                 P    [        U R                  5       R                  5       5      $ )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.
)len
get_figureget_axesax_ims    r   
n_subplotsr   ,   s!    & u!**,--r   c                  V   [         R                  5         [        [        5         [        R
                  " [        5      n S S S 5        W R                  R                  S:X  d   eU R                  5       S:X  d   e[        U 5      S:X  d   eU R                  b   eg ! , (       d  f       Na= f)Ngray)r   r      )pltfigurer   imshow_expected_warningsr   imshowim8cmapnameget_climr   colorbarr   s    r   
test_uint8r'   B   s}    JJL	3	4		# 
5::??f$$$>>x'''e!!!>>!!! 
5	4   B
B(c                  V   [         R                  5         [        [        5         [        R
                  " [        5      n S S S 5        W R                  R                  S:X  d   eU R                  5       S:X  d   e[        U 5      S:X  d   eU R                  b   eg ! , (       d  f       Na= f)Nr   )r   i  r   )r   r   r   r    r   r!   im16r#   r$   r%   r   r&   r   s    r   test_uint16r+   L   s}    JJL	3	4		$ 
5::??f$$$>>z)))e!!!>>!!! 
5	4r(   c                  V   [         R                  5         [        [        5         [        R
                  " [        5      n S S S 5        W R                  R                  S:X  d   eU R                  5       S:X  d   e[        U 5      S:X  d   eU R                  b   eg ! , (       d  f       Na= f)Nr   )r   r   r   )r   r   r   r    r   r!   imfr#   r$   r%   r   r&   r   s    r   
test_floatr.   V   s}    JJL	3	4		# 
5::??f$$$>>v%%%e!!!>>!!! 
5	4r(   c                  (   [        [        S/-   5         [        R                  " [        5      n S S S 5        W R                  5       [        R                  5       [        R                  5       4:X  d   eU R                  c   eg ! , (       d  f       NZ= f)NLow image data range)	r   r    r   r!   im_lor%   minmaxr&   r   s    r   test_low_data_ranger4   `   sh    	37M6NN	O		%  
P>>		UYY[9999>>%%%	 
P	Os   B
Bc                  r   [         R                  5         [        [        S/-   5         [        R
                  " [        5      n S S S 5        W R                  5       [        R                  5       [        R                  5       4:X  d   e[        U 5      S:X  d   eU R                  c   eg ! , (       d  f       Nk= f)Nzout of standard range   )r   r   r   r    r   r!   im_hir%   r2   r3   r   r&   r   s    r   test_outside_standard_ranger8   h   s    JJL	37N6OO	P		%  
Q>>		UYY[9999e!!!>>%%%	 
Q	P   B((
B6c                  r   [         R                  5         [        [        S/-   5         [        R
                  " [        5      n S S S 5        W R                  5       [        R                  5       [        R                  5       4:X  d   e[        U 5      S:X  d   eU R                  c   eg ! , (       d  f       Nk= f)Nr0   r6   )r   r   r   r    r   r!   im64r%   r2   r3   r   r&   r   s    r   test_nonstandard_typer<   q   s    JJL	37M6NN	O		$ 
P>>
DHHJ7777e!!!>>%%%	 
P	Or9   c                  N   [         R                  5         [        R                  " SS/SS//5      n [	        [
        5         [        R                  " U 5      nS S S 5        WR                  5       S:X  d   e[        U5      S:X  d   eUR                  c   eg ! , (       d  f       NE= f)N      gɿg?g?)r>   g      ?r6   )r   r   nparrayr   r    r   r!   r%   r   r&   )	im_signedr   s     r   test_signed_imagerB   z   s    JJL4,c
34I	3	4		)$ 
5>>{***e!!!>>%%%	 
5	4s    B
B$)#numpyr?   pytestskimager   skimage._shared._warningsr   "skimage._shared._dependency_checksr   importorskipr   switch_backendfixturer   r@   uint8r"   astypeuint16r*   uint64r;   r-   r1   r7   r    appendr   r'   r+   r.   r4   r8   r<   rB   r
   r   r   <module>rP      s       7 6-.u   	hhB#s$bhh/
zz"))s"
zz"))	Cid
b  ##`
.,"""&&&&r   