now we filter the channels separately and build composite image out of it with mh as_rgb this function takes two-dimensional arraysperforms contrast stretching to make each an -bit integer arrayand then stacks themr mh gaussian_filter( mh gaussian_filter( mh gaussian_filter( im mh as_rgbr , , we then blend the two images from the center away to the edges first we need to build weights arraywthat will contain at each pixel normalized valuewhich is its distance to the centerh, shape height and width , np mgrid[: ,:wwe used the np mgrid objectwhich returns arrays of size (hwwith values corresponding to the and coordinates respectivelyy - / center at / max(normalize to - + - / max(we now use gaussian function to give the center region high valuew np exp(- *( ** ** )normalize again to min( ptp( [:,:,nonethis adds dummy third dimension to notice how all of these manipulations are performed using numpy arrays and not some mahotas-specific methodology this is one advantage of the python numpy ecosystemthe operations you learned to perform when you were learning about pure machine learning now become useful in completely different context