?????????? ????????? - ??????????????? - /usr/lib64/python3.9/site-packages/numpy/lib/__pycache__/arraypad.cpython-39.pyc
???????
a z[yc�y � @ s� d Z ddlZddlmZ ddlmZ dgZdd� Zdd � Z d d� Z d#dd �Zdd� Zdd� Z dd� Zdd� Zd$dd�Zdd� Zd%dd�Zd&dd�Zeedd �d'd"d��ZdS )(zl The arraypad module contains a group of functions to pad values onto the edges of an n-dimensional array. � N)�array_function_dispatch)�ndindex�padc C s t �|t j�r| j| d� dS )z� Rounds arr inplace if destination dtype is integer. Parameters ---------- arr : ndarray Input array. dtype : dtype The dtype of the destination array. )�outN)�npZ issubdtypeZinteger�round)Zarr�dtype� r �8/usr/lib64/python3.9/site-packages/numpy/lib/arraypad.py�_round_if_needed s r c C s t d�f| | f d S )a� Construct tuple of slices to slice an array in the given dimension. Parameters ---------- sl : slice The slice for the given dimension. axis : int The axis to which `sl` is applied. All other dimensions are left "unsliced". Returns ------- sl : tuple of slices A tuple with slices matching `shape` in length. Examples -------- >>> _slice_at_axis(slice(None, 3, -1), 1) (slice(None, None, None), slice(None, 3, -1), (...,)) N).��slice)�sl�axisr r r �_slice_at_axis! s r c C s* |d7 }t d�f| ||d� }| | S )a� Get a view of the current region of interest during iterative padding. When padding multiple dimensions iteratively corner values are unnecessarily overwritten multiple times. This function reduces the working area for the first dimensions so that corners are excluded. Parameters ---------- array : ndarray The array with the region of interest. original_area_slice : tuple of slices Denotes the area with original values of the unpadded array. axis : int The currently padded dimension assuming that `axis` is padded before `axis` + 1. Returns ------- roi : ndarray The region of interest of the original `array`. � Nr )�array�original_area_slicer r r r r � _view_roi: s r c C sx t dd� t| j|�D ��}| jjr&dnd}tj|| j|d�}|durN|�|� t dd� t| j|�D ��}| ||<