AI engineering glossary · NumPy pandas visualization
What is vectorization?
Vectorization (also called vectorised operations): Writing computations as operations on whole arrays instead of Python loops over single elements. The looping then happens inside optimised compiled code, which is usually tens to hundreds of times faster and also shorter to read. Vectorised style is the normal way to write numerical code in NumPy and pandas.
Vectorization: an example
prices * 1.18 adds 18 percent GST to every price in an array at once, replacing a for loop over each item.
Related terms
More NumPy pandas visualization terms
Where you learn it
Vectorization is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.