
Often writing code that deals with data that has units can be confusing. A function might return an array but at least with plain NumPy arrays, there is no way to easily tell what the units of the data are without somehow knowing a priori.
The unyt package (pronounced like “unitâ€) provides a subclass of NumPy’s ndarray class that knows about units.