def METHOD_NAME(self, backend, inplace=False, deep=False, **kwargs):
    """ Converts triangle array_backend.
    Parameters
    ----------
    backend : str
        Currently supported options are 'numpy', 'sparse', and 'cupy'
    inplace : bool
        Whether to mutate the existing Triangle instance or return a new
        one.
    Returns
    -------
        Triangle with updated array_backend
    """
    if hasattr(self, "array_backend"):
        old_backend = self.array_backend
    else:
        if hasattr(self, "ldf_"):
            old_backend = self.ldf_.array_backend
        else:
            raise ValueError("Unable to determine array backend.")
    if inplace:
        # Coming from dask - compute and then recall this method
        # going to dask  -
        if old_backend == "dask" and backend != "dask":
            self = self.compute()
            old_backend = self.array_backend
        if backend in ["numpy", "sparse", "cupy", "dask"]:
            lookup = {
                "numpy": {
                    "sparse": lambda x: x.todense(),
                    "cupy": lambda x: cp.asnumpy(x),
                },
                "cupy": {
                    "numpy": lambda x: cp.array(x),
                    "sparse": lambda x: cp.array(x.todense()),
                },
                "sparse": {
                    "numpy": lambda x: sp.array(x),
                    "cupy": lambda x: sp.array(cp.asnumpy(x)),
                },
                "dask": {
                    # should this be chunked?
                    "numpy": lambda x: dp.from_array(x, **kwargs),
                    "cupy": lambda x: dp.from_array(x, **kwargs),
                    "sparse": lambda x: dp.from_array(x, **kwargs),
                },
            }
            if hasattr(self, "values"):
                self.values = lookup[backend].get(old_backend, lambda x: x)(
                    self.values
                )
            if deep:
                for k, v in vars(self).items():
                    if isinstance(v, Common):
                        v.METHOD_NAME(backend, inplace=True, deep=True)
            if hasattr(self, "array_backend"):
                self.array_backend = backend
        else:
            raise AttributeError(backend, "backend is not supported.")
        return self
    else:
        obj = self.copy()
        return obj.METHOD_NAME(backend=backend, inplace=True, deep=deep, **kwargs)