yt.units.yt_array.YTArray.unit_array

YTArray.unit_array

Get a YTArray filled with ones with the same unit and shape as this array