I don’t think it’s ready-mades, but starting with zeros and copying x into y[::2, ::2] and y[1::2, 1::2] should do the trick.
If your x isn’t tiny and the “stencil matrix” is reasonably small, a for foop over the stencil isn’t a performance headache.
Best regards
Thomas