Posts tagged with "numpy"

Numpy is a Python library designed for scientific computing.

It contains implementations for various things that are useful for scientific computing:

  • A high performance implementation for N dimensional arrays
  • The ability to perform operations on these arrays with SIMD which they refer to as broadcasting
  • Useful utilities for linear algebra/fourier transforms/etc

While you could use Python's built in data structures like lists for representing vectors of data when doing scientific computing work the performance would be far worse due to inefficiencies of using the built in data type for those workloads. Numpy is highly optimized for these workloads and performs well on real, non-toy, sized data.

2 Posts

NumPy introduction

You want to deal with bulk data from your Python program. You realise that looping over every cell of a huge array from your Python code would be silly. You also would like the convenience of many kinds of canned routine to transform your data easily and efficiently. Enter NumPy!

Published on September 16th, 2018 by Nick Downing.

Cache locality in Python lists

The other day I got asked what the cache locality of lists in CPython was and how the lists are layed out in memory. Because I always tend…

Published on June 18th, 2018 by Janis Lesinskis.