I'll add a short doctest-like example. If I'm to include both masking and wrap around here, we're looking at quite a few lines of code to do some meaningful examples. Is there some kind of limit to how long this kind of example should be?

Related note: I think all the functions that are demonstrated in the example gallery should have the examples cross-linked in the API docs. That might reduce the need to include example code in two places. If there is a sphinx extension for this, that would be superb.