pad_bounding_box
- sherpa.utils.pad_bounding_box(kernel, mask)[source] [edit on github]
Expand the kernel to match the mask.
- Parameters:
- Returns:
- nkernel
ndarray The output is the same size as the mask, and initialized to zero everywhere. Cells where the mask is non-zero are copied from the kernel.
- nkernel
Examples
>>> pad_bounding_box([1, 2, 3, 4], [1, 1, 0, 1, 1, 0, 0, 0, 0]) array([ 1., 2., 0., 3., 4., 0., 0., 0., 0.])