AI engineering glossary · NumPy pandas visualization

What is masked array?

Masked array (also called np.ma): A NumPy array paired with a Boolean mask that marks some entries as invalid. Calculations such as mean skip the masked entries automatically. It is an alternative to NaN for flagging bad readings, and it works for integer data too, which cannot hold NaN.

Level: advancedTopic: NumPy pandas visualization

Masked array: an example

A sensor array where -999 means a failed reading can be masked so np.ma.mean ignores those values.

Related terms

More NumPy pandas visualization terms

Where you learn it

Masked array 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.