<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def decodeThetas(self, predictedCells):
 """ Given the set of predicted cells, return the predicted theta1 and theta2 """

    a = numpy.zeros(self.bottomUpInputSize)
    a[predictedCells] = 1
    a = a.reshape((self.theta1Encoder.getWidth(), self.theta1Encoder.getWidth()))
    theta1PredictedBits = a.mean(axis=0).nonzero()[0]
    theta2PredictedBits = a.mean(axis=1).nonzero()[0]

    # To decode it we need to create a flattened array again and pass it
    # to encoder.
    # TODO: We use encoder's topDownCompute method - not sure if that is best.
    t1 = numpy.zeros(self.theta1Encoder.getWidth())
    t1[theta1PredictedBits] = 1
    t1Prediction = self.theta1Encoder.topDownCompute(t1)[0].value

    t2 = numpy.zeros(self.theta2Encoder.getWidth())
    t2[theta2PredictedBits] = 1
    t2Prediction = self.theta2Encoder.topDownCompute(t2)[0].value

    # print >> sys.stderr, "predicted cells = ", predictedCells
    # print >> sys.stderr, "decoded theta1 bits = ", theta1PredictedBits
    # print >> sys.stderr, "decoded theta2 bits = ", theta2PredictedBits
    # print >> sys.stderr, "decoded theta1 value = ", t1Prediction
    # print >> sys.stderr, "decoded theta2 value = ", t2Prediction

    return t1Prediction, t2Prediction