Vectors, Matrices, and Multidimensional Arrays

  • Robert Johansson


Vectors, matrices, and arrays of higher dimensions are essential tools in numerical computing. When a computation must be repeated for a set of input values, it is natural and advantageous to represent the data as arrays and the computation in terms of array operations. Computations that are formulated this way are said to be vectorized. Vectorized computing eliminates the need for many explicit loops over the array elements by applying batch operations on the array data. The result is concise and more maintainable code, and it enables delegating the implementation of (e.g., elementwise) array operations to more efficient low-level libraries. Vectorized computations can therefore be significantly faster than sequential element-by-element computations. This is particularly important in an interpreted language such as Python, where looping over arrays element by element entails a significant performance overhead.

Copyright information

© Robert Johansson 2019

Authors and Affiliations

  • Robert Johansson
    • 1
  1. 1.Urayasu-shi, ChibaJapan

Personalised recommendations