File: //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/arraypad.pyc
�
�9Zc @` s: d Z d d l m Z m Z m Z d d l Z d g Z e d � Z d � Z
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 d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z e d � Z d � Z d � Z d S( sl
The arraypad module contains a group of functions to pad values onto the edges
of an n-dimensional array.
i ( t divisiont absolute_importt print_functionNt padc ` s� t � � f d � t | j � D� � } | sK t j d � � d � } n t j � � d d � } | j | � } xE t � � D]7 \ } } | j | | k r� | j | d | �} q� q� W| S( s�
Create an ndarray of `shape` with increments along specified `axis`
Parameters
----------
arr : ndarray
Input array of arbitrary shape.
shape : tuple of ints
Shape of desired array. Should be equivalent to `arr.shape` except
`shape[axis]` which may have any positive value.
axis : int
Axis to increment along.
reverse : bool
If False, increment in a positive fashion from 1 to `shape[axis]`,
inclusive. If True, the bounds are the same but the order reversed.
Returns
-------
padarr : ndarray
Output array sized to pad `arr` along `axis`, with linear range from
1 to `shape[axis]` along specified `axis`.
Notes
-----
The range is deliberately 1-indexed for this specific use case. Think of
this algorithm as broadcasting `np.arange` to a single `axis` of an
arbitrarily shaped ndarray.
c 3` s1 | ]'