'This allows code that requests a Numpy array to use an NDData
object as a Numpy array.'

def __array__(self):

    if (self.mask is not None):
        return np.ma.masked_array(self.data, self.mask)
    else:
        return np.array(self.data)
