a
    Lªf~  ã                   @   sH   d Z ddlmZ ddlmZmZ ddlmZ g d¢Zedƒdd„ ƒZ	d	S )
z
Miscellaneous utils.
é    )Úasarray)Únormalize_axis_tupleÚnormalize_axis_index)Ú
set_module)Úbyte_boundsr   r   znumpy.lib.array_utilsc           
      C   sœ   | j }|d d }|d }|d }t| ƒjj}| }}|du rN|| j| 7 }nFt||ƒD ]2\}}	|	dk rz||d |	 7 }qX||d |	 7 }qX||7 }||fS )aC  
    Returns pointers to the end-points of an array.

    Parameters
    ----------
    a : ndarray
        Input array. It must conform to the Python-side of the array
        interface.

    Returns
    -------
    (low, high) : tuple of 2 integers
        The first integer is the first byte of the array, the second
        integer is just past the last byte of the array.  If `a` is not
        contiguous it will not use every byte between the (`low`, `high`)
        values.

    Examples
    --------
    >>> I = np.eye(2, dtype='f'); I.dtype
    dtype('float32')
    >>> low, high = np.lib.array_utils.byte_bounds(I)
    >>> high - low == I.size*I.itemsize
    True
    >>> I = np.eye(2); I.dtype
    dtype('float64')
    >>> low, high = np.lib.array_utils.byte_bounds(I)
    >>> high - low == I.size*I.itemsize
    True

    Údatar   ÚstridesÚshapeNé   )Z__array_interface__r   ZdtypeÚitemsizeÚsizeÚzip)
ÚaZaiZa_dataZastridesZashapeZbytes_aZa_lowZa_highr	   Zstride© r   úT/var/www/ai-form-bot/venv/lib/python3.9/site-packages/numpy/lib/_array_utils_impl.pyr      s    !r   N)
Ú__doc__Znumpy._corer   Znumpy._core.numericr   r   Znumpy._utilsr   Ú__all__r   r   r   r   r   Ú<module>   s   