Want to keep learning?

This content is taken from the Partnership for Advanced Computing in Europe (PRACE)'s online course, Python in High Performance Computing. Join the course to learn more.

Hands-on: Temporary arrays

In this exercise we study how NumPy uses computer memory

Source code for this exercise is located in numpy/temporary-arrays/

Try different NumPy array expressions and investigate how much memory is used in temporary arrays. You can use the Unix command /usr/bin/time –v for finding out the maximum memory usage of program. You can find also small utility function maxmem() for investigating memory usage in demos/memory_usage.py.

How many temporary arrays can you get for example with uncessary usage of parenthesis?

Share this article:

This article is from the free online course:

Python in High Performance Computing

Partnership for Advanced Computing in Europe (PRACE)