<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encodeMotorInput(self, motorInput):
 """ Encode motor command to bit vector. @param motorInput (1D numpy.array) Motor command to be encoded. @return (1D numpy.array) Encoded motor command. """

    if not hasattr(motorInput, "__iter__"):
      motorInput = list([motorInput])

    return self.motorEncoder.encode(motorInput)