Use self.data.ravel() to handle >1D arrays here