AI engineering glossary · NumPy pandas visualization

What is einsum?

einsum (also called Einstein summation): A NumPy function, short for Einstein summation, that expresses multiplications, sums and axis rearrangements of arrays in a compact string such as 'ij,jk->ik'. Repeated letters are multiplied and summed. It replaces many separate transpose and dot calls and is common in deep learning code.

Level: advancedTopic: NumPy pandas visualization

einsum: an example

np.einsum('ij,jk->ik', A, B) multiplies two matrices, the same as A @ B.

Related terms

More NumPy pandas visualization terms

Where you learn it

einsum is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.