I have two Numpy arrays (3-dimensional uint8) converted from PIL images.
I want to find if the first image contains the second image, and if so, find out the coordin
This can be done using scipy's correlate2d and then using argmax to find the peak in the cross-correlation.
Here's a more complete explanation of the math and ideas, and some examples.
If you want to stay in pure Numpy and not even use scipy, or if the images are large, you'd probably be best using an FFT based approach to the cross-correlations.
Edit: The question specifically asked for a pure Numpy solution. But if you can use OpenCV, or other image processing tools, it's obviously easier to use one of these. An example of such is given by PiQuer below, which I'd recommend if you can use it.