SciTools/cartopy — pull request #394 by ajdawson (2014-03-03 19:55:39+00:00)
Title: Utility function to add cyclic points.

This PR introduces a new function to add cyclic points to data arrays and coordinates, addressing issue #393.

I went for an API that allows the coordinate to be optional, thus making it easy to apply to multiple arrays separately, and I feel this means the function itself need not accept more than one array at a time. Supporting multiple array inputs would mean either making assumptions about the similarity of the input arrays, or lots of explicit checking, which would complicate an otherwise straightforward approach.

Masked arrays are handled by using `numpy.ma.concatenate` throughout, which does the correct thing for both masked and unmasked arrays.