AI engineering glossary · NumPy pandas visualization

What is dtype?

dtype (also called data type): The data type of every element in a NumPy array, such as int64, float32 or bool. It fixes how many bytes each value uses and how the bytes are interpreted. Choosing a smaller type saves memory, while a type that is too small can lose precision or overflow.

Level: beginnerTopic: NumPy pandas visualization

dtype: an example

np.array([1.5, 2.5], dtype=np.float32).dtype gives float32, so each number takes 4 bytes instead of the 8 bytes of float64.

Related terms

More NumPy pandas visualization terms

Where you learn it

dtype 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.