`numpy.take`

in `'wrap'`

mode will use your indices modulo the length of the array.

```
indices = range(i-2,i+3)
neighbourhood = A.take(indices, mode="wrap")
```

See documentation for details `numpy.take`

### Related Contents:

- Converting between datetime, Timestamp and datetime64
- How do I convert a PIL Image into a NumPy array?
- How to take column-slices of dataframe in pandas
- ValueError: setting an array element with a sequence
- How can I check whether a numpy array is empty or not?
- How to flatten only some dimensions of a numpy array
- Cartesian product of x and y array points into single array of 2D points
- Add single element to array in numpy
- Detect if a NumPy array contains at least one non-numeric value?
- Normalize data in pandas
- Strings in a DataFrame, but dtype is object
- surface plots in matplotlib
- How to identify numpy types in python?
- Working with TIFFs (import, export) in Python using numpy
- Multiplying across in a numpy array
- Numpy: Should I use newaxis or None?
- How to delete columns in numpy.array
- mean, nanmean and warning: Mean of empty slice
- Flattening a list of NumPy arrays?
- Python “TypeError: unhashable type: ‘slice'” for encoding categorical data
- Function to determine if two numbers are nearly equal when rounded to n significant decimal digits
- find length of sequences of identical values in a numpy array (run length encoding)
- Is the order of a Python dictionary guaranteed over iterations?
- Getting the integer index of a Pandas DataFrame row fulfilling a condition?
- PyTorch memory model: “torch.from_numpy()” vs “torch.Tensor()”
- Filtering (reducing) a NumPy Array
- Is there a head and tail method for Numpy array?
- pandas groupby and join lists
- Saving arrays as columns with np.savetxt
- How to get the values from a NumPy array using multiple indices
- How can I serialize a numpy array while preserving matrix dimensions?
- Compiling numpy with OpenBLAS integration
- Converting Numpy Array to OpenCV Array
- Difference between nonzero(a), where(a) and argwhere(a). When to use which?
- Passing list-likes to .loc or [] with any missing labels is no longer supported
- Find index where elements change value numpy
- Correct way to obtain confidence interval with scipy
- How do I fit a sine curve to my data with pylab and numpy?
- why do we need np.squeeze()?
- TypeError with ufunc bitwise_xor
- Checking if a matrix is symmetric in Numpy
- How does reduce_sum() work in tensorflow?
- Convolve2d just by using Numpy
- Get original indices of a sorted Numpy array
- Index multiple, non-adjacent ranges in numpy
- Is there a test suite for numpy / scipy?
- Using numpy.genfromtxt to read a csv file with strings containing commas
- Numpy argmax. How to compute both max and argmax?
- How to create a white image in Python?
- Numpy quirk: Apply function to all pairs of two 1D arrays, to get one 2D array