def METHOD_NAME(self, xp, scp):
    a = self._make_matrix(xp, self.dtype, self.order)
    b = self._make_matrix(xp, self.dtype, self.order)
    # RussellRao expects boolean arrays
    if self.metric == "russellrao":
        a[a < 0.5] = 0
        a[a >= 0.5] = 1
        b[b < 0.5] = 0
        b[b >= 0.5] = 1
    # JensenShannon expects probability arrays
    elif self.metric == "jensenshannon":
        a_n = a
        b_n = b
        if xp == cupy:
            a_n = a_n.get()
            b_n = b_n.get()
        # l1 normalization is different between cupy and numpy
        # so use numpy.
        norm = numpy.sum(a_n, axis=1)
        a = (a_n.T / norm).T
        if xp == cupy:
            a = cupy.asarray(a)
        norm = numpy.sum(b_n, axis=1)
        b = (b_n.T / norm).T
        if xp == cupy:
            b = cupy.asarray(b)
    if self.metric == 'minkowski':
        out = scp.spatial.distance.cdist(a, b, metric=self.metric,
                                         p=self.p).astype(self.dtype)
    else:
        out = scp.spatial.distance.cdist(a, b, metric=self.metric)\
            .astype(self.dtype)
    print(str(out.shape))
    return out