<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compute(self, egocentricLocation):
 """ Compute the new active cells from the given "sensor location relative to body" vector. @param egocentricLocation (pair of floats) [di, dj] offset of the sensor from the body. """

    offsetInCellFields = (np.matmul(self.rotationMatrix, egocentricLocation) *
                          self.cellFieldsPerUnitDistance)

    np.mod(offsetInCellFields, self.cellDimensions, out=offsetInCellFields)
    self.activeCells = np.unique(
      np.ravel_multi_index(np.floor(offsetInCellFields).T.astype('int'),
                           self.cellDimensions))