'Transform one set of coordinates to another'

def transform(self, input_coords):

    if self.same_frames:
        return input_coords
    (x_in, y_in) = (input_coords[:, 0], input_coords[:, 1])
    c_in = SkyCoord(x_in, y_in, unit=(u.deg, u.deg), frame=self.input_system)
    with np.errstate(all='ignore'):
        c_out = c_in.transform_to(self.output_system)
    if issubclass(c_out.representation, (SphericalRepresentation, UnitSphericalRepresentation)):
        lon = c_out.data.lon.deg
        lat = c_out.data.lat.deg
    else:
        lon = c_out.spherical.lon.deg
        lat = c_out.spherical.lat.deg
    return np.concatenate((lon[:, np.newaxis], lat[:, np.newaxis]), axis=1)
