Skip main navigation

Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. T&Cs apply

Hands-on: Temporary arrays

Explore memory usage with NumPy
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?

© CSC - IT Center for Science Ltd.
This article is from the free online

Python in High Performance Computing

Created by
FutureLearn - Learning For Life