Get slices for the overlapping part of a small and a large array.
Given a certain position of the center of the small array, with respect to the large array, tuples of slices are returned which can be used to extract, add or subtract the small array at the given position. This function takes care of the correct behavior at the boundaries, where the small array is cut of appropriately.
Parameters: | large_array_shape : tuple
small_array_shape : tuple
position : tuple
|
---|---|
Returns: | slices_large : tuple of slices
slices_small : slice
|