def transform(self, xy):
    if (self._axis is not None):
        if self._use_rmin:
            rmin = self._axis.viewLim.ymin
        else:
            rmin = 0
        theta_offset = self._axis.get_theta_offset()
        theta_direction = self._axis.get_theta_direction()
    else:
        rmin = 0
        theta_offset = 0
        theta_direction = 1
    x = xy[:, 0:1]
    y = xy[:, 1:]
    r = np.sqrt(((x * x) + (y * y)))
    theta = np.arccos((x / r))
    theta = np.where((y < 0), ((2 * np.pi) - theta), theta)
    theta -= theta_offset
    theta *= theta_direction
    r += rmin
    return np.concatenate((theta, r), 1)
def transform(self, xy):
    if (self._axis is not None):
        if self._use_rmin:
            rmin = self._axis.viewLim.ymin
        else:
            rmin = 0
        theta_offset = self._axis.get_theta_offset()
        theta_direction = self._axis.get_theta_direction()
    else:
        rmin = 0
        theta_offset = 0
        theta_direction = 1
    x = xy[:, 0:1]
    y = xy[:, 1:]
    r = np.sqrt(((x * x) + (y * y)))
    theta = np.arccos((x / r))
    theta = np.where((y < 0), ((2 * np.pi) - theta), theta)
    theta -= theta_offset
    theta *= theta_direction
    r += rmin
    return np.concatenate((theta, r), 1)