
    Bwg_                     8    d dl Zd dlmZ d dlmZ  G d d      Zy)    N)array_utils)assert_equalc                   $    e Zd Zd Zd Zd Zd Zy)TestByteBoundsc                     t        j                  d      j                  dd      }t        j                  |      \  }}t        ||z
  |j                  |j                  z         y N         )nparangereshaper   byte_boundsr   sizeitemsize)selfalowhighs       W/var/www/horilla/myenv/lib/python3.12/site-packages/numpy/lib/tests/test_array_utils.pytest_byte_boundszTestByteBounds.test_byte_bounds   sM     IIbM!!!Q'++A.	TTCZ!**!45    c                     t        j                  d      j                  dd      }|j                  }t	        j
                  |      \  }}t        ||z
  |j                  |j                  z         y r   	r   r   r   Tr   r   r   r   r   r   r   br   r   s        r   "test_unusual_order_positive_stridez1TestByteBounds.test_unusual_order_positive_stride   sT    IIbM!!!Q'CC++A.	TTCZ!**!45r   c                     t        j                  d      j                  dd      }|j                  d d d   }t	        j
                  |      \  }}t        ||z
  |j                  |j                  z         y )Nr	   r
   r   r   r   s        r   "test_unusual_order_negative_stridez1TestByteBounds.test_unusual_order_negative_stride   s\    IIbM!!!Q'CC"I++A.	TTCZ!**!45r   c                     t        j                  d      }|d d d   }t        j                  |      \  }}t	        ||z
  |j
                  dz  |j                  z  |j                  z
         y )Nr	      )r   r   r   r   r   r   r   r   s        r   test_stridedzTestByteBounds.test_strided   sZ    IIbMccF++A.	T 	TCZ!ajj!81::!EFr   N)__name__
__module____qualname__r   r   r!   r$    r   r   r   r      s    666Gr   r   )numpyr   	numpy.libr   numpy.testingr   r   r(   r   r   <module>r,      s     ! &G Gr   