def run_length_decode(in_array):
switch=False<EOL>out_array=[]<EOL>in_array = in_array.tolist()<EOL>for item in in_array:<EOL><INDENT>if switch==False:<EOL><INDENT>this_item = item<EOL>switch=True<EOL><DEDENT>else:<EOL><INDENT>switch=False<EOL>out_array.extend([this_item]*int(item))<EOL><DEDENT><DEDENT>return numpy.asarray(out_array, dtype=numpy.int32)<EOL>
A function to run length decode an int array.

    :param in_array: the input array of integers
    :return the decoded array