def _account_for_circular(self, points, data): """ Extend the given data array, and re-centralise coordinate points for circular (1D) coordinates. """ for (circular, modulus, index, dim, offset) in self._circulars: if modulus: # Map all the requested values into the range of the source # data (centred over the centre of the source data to allow # extrapolation where required). points[:, index] = wrap_circular_points(points[:, index], offset, modulus) # Also extend data if circular (to match the coord points, which # 'setup' already extended). if circular: data = extend_circular_data(data, dim) return points, data