Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- import time
- import random
- import numpy as np
- random.seed(time.time())
- t1 = time.time()
- v = np.vectorize(lambda b: math.pow(b, 1.546) if b > 0.5 else math.pow(b, 0.434232))
- a = np.arctan(np.cos(v(np.random.random((4999999))) + np.arange(4999999)))
- t2 = time.time()
- print t2 - t1
Advertisement
Add Comment
Please, Sign In to add comment