def generateRandomInput(numRecords, elemSize = <NUM_LIT>, numSet = <NUM_LIT>):
inputs = []<EOL>for _ in range(numRecords):<EOL><INDENT>input = np.zeros(elemSize, dtype=realDType)<EOL>for _ in range(<NUM_LIT:0>,numSet):<EOL><INDENT>ind = np.random.random_integers(<NUM_LIT:0>, elemSize-<NUM_LIT:1>, <NUM_LIT:1>)[<NUM_LIT:0>]<EOL>input[ind] = <NUM_LIT:1><EOL><DEDENT>while abs(input.sum() - numSet) > <NUM_LIT:0.1>:<EOL><INDENT>ind = np.random.random_integers(<NUM_LIT:0>, elemSize-<NUM_LIT:1>, <NUM_LIT:1>)[<NUM_LIT:0>]<EOL>input[ind] = <NUM_LIT:1><EOL><DEDENT>inputs.append(input)<EOL><DEDENT>return inputs<EOL>
Generates a set of input record

    Params:
            numRecords - how many records to generate
            elemSize - the size of each record (num 0s or 1s)
            numSet - how many 1s in each record

    Returns: a list of inputs