def with_added_dimensions(self, n):
        """
        Adds n dimensions and returns the Rect.  If n < 0, removes
        dimensions.
        """
        if n > 0:
            return Rect(np.pad(self.data, ((0, 0), (0, n)), 'constant'))
        return Rect(self.data[:, :self.dimensions + n])
Adds n dimensions and returns the Rect.  If n < 0, removes
        dimensions.