embed_slices¶
- artpop.util.embed_slices(center, model_shape, image_shape)[source]¶
Get slices to embed smaller model array into larger image array.
- Parameters
- center
ndarray
Center of array in the image coordinates.
- model_shapetuple
Shape of the array to embed (dimensions must be odd).
- image_shapetuple
Shape of the main image array.
- center
- Returns
- img_slice, mod_slicetuples of slices
Slicing indices. To embed array in image, use the following: image[img_slice] = model[mod_slice]