def as_2d(self):
        """ get a 2D representation of x.  If not self.isdiagonal, simply
        return reference to self.x, otherwise, constructs and returns
        a 2D, diagonal ndarray

        Returns
        -------
        numpy.ndarray : numpy.ndarray

        """
        if not self.isdiagonal:
            return self.x
        return np.diag(self.x.flatten())
get a 2D representation of x.  If not self.isdiagonal, simply
        return reference to self.x, otherwise, constructs and returns
        a 2D, diagonal ndarray

        Returns
        -------
        numpy.ndarray : numpy.ndarray