Created
February 19, 2020 19:54
-
-
Save wenweixu/7cba46585c9dae9406219da8fa68ece6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def myf(r,c): | |
return r+c | |
f = np.vectorize(myf) | |
r_arr = np.meshgrid(range(10000),range(10000)) | |
c_arr = np.meshgrid(range(10000),range(10000)) | |
start = time.time() | |
z_arr = f(r_arr, c_arr) | |
print(time.time() - start) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With imports: