@classmethod
def from_W(cls, W):
    """
        Constructs a WSP object from the W's sparse matrix

        Parameters
        ----------
        W       :   libpysal.weights.W
                    a pysal weights object with a sparse form and ids

        Returns
        -------
        a WSP instance
        """
    return cls(W.sparse, id_order=W.id_order)
