I have the following code to create an array:
    for i in range(channel_count):
        if not result[i] is None:
            result[i] = array('f', result[i])
    return result
Is there any other faster way to create arrays in python 2.7, so it takes less time to execute the code.
 
     
    