Created
January 7, 2014 15:52
-
-
Save athiakos/8301383 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import numpy as np | |
n = 30 | |
m = 100000 | |
# using memory_profiler package | |
@profile | |
def main(): | |
foo = np.zeros((n,m)) | |
boo = np.random.random(m) | |
blah = np.random.random(n) | |
for index, whatever in enumerate(blah): | |
foo[index,:] += boo | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment