AI engineering glossary · NumPy pandas visualization
What is shape?
Shape (also called array shape): A tuple giving the length of an array along each of its dimensions. The product of its entries equals the total number of elements. Nearly every array bug in data and machine learning code is a mismatch of these lengths, so checking it is the first debugging step.
Shape: an example
A batch of 32 greyscale images of 28 by 28 pixels stored as an array has shape (32, 28, 28).
Related terms
More NumPy pandas visualization terms
Where you learn it
Shape is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.