Skip main navigation

Hurry, only 2 days left to get one year of Unlimited learning for £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

Hands-on: Temporary arrays

Explore memory usage with NumPy
© CSC - IT Center for Science Ltd.

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

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now