BUG: fix loading all variable data during slicing

Accessing the data attribute loads all data into memory as a numpy array, which is obviously problematic! This fix replaces `self.data.ndim` with `self.ndim`, which means the data doesn't all need to be loaded.