@classmethod
def from_coo(cls, x):
    """
        Get a :obj:`DOK` array from a :obj:`COO` array.

        Parameters
        ----------
        x : COO
            The array to convert.

        Returns
        -------
        DOK
            The equivalent :obj:`DOK` array.

        Examples
        --------
        >>> from sparse import COO
        >>> s = COO.from_numpy(np.eye(4))
        >>> s2 = DOK.from_coo(s)
        >>> s2
        <DOK: shape=(4, 4), dtype=float64, nnz=4, fill_value=0.0>
        """
    ar = cls(x.shape, dtype=x.dtype, fill_value=x.fill_value)
    for c, d in zip(x.coords.T, x.data):
        ar.data[tuple(c)] = d
    return ar
