<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def anchorCompute(self, anchorInput, learn):
 """ Compute the "sensor's location relative to a specific object" from the feature-location pair. @param anchorInput (numpy array) Active cells in the feature-location pair layer @param learn (bool) If true, maintain current cell activity and learn this input on the currently active cells """

    if learn:
      self._anchorComputeLearningMode(anchorInput)
    else:
      overlaps = self.anchorConnections.computeActivity(
        anchorInput, self.connectedPermanence)

      self.activeSegments = np.where(overlaps >= self.activationThreshold)[0]
      self.activeCells = np.unique(
        self.anchorConnections.mapSegmentsToCells(self.activeSegments))