Conversation started Jul 12, 2013 at 18:10.
Jul 12, 2013 18:10
Because I'm too lazy to use pastebin:
import numpy as np
import time

A = np.arange(0, 100000, 2)
B = np.arange(1, 100001, 2)
test = np.arange(100000)

print 'Testing start'
start = time.clock()
C = []
for elem in zip(A, B):
    C.extend(elem)
stop = time.clock()

print 'User Ma3x:\t\tTime of execution:', stop - start, '\t\tValid Array?: ', np.array_equal(C, test)

C = []

start = time.clock()
C = [y for x in zip(A, B) for y in x]
stop = time.clock()

print 'User mishik:\tTime of execution:', stop - start, '\t\tValid Array?: ', np.array_equal(C, test)
 
Conversation ended Jul 12, 2013 at 18:10.