def METHOD_NAME(p, origin=None):
    if type(p) == list:
        return [METHOD_NAME(x, origin) for x in p]
    elif isinstance(p, numpy.ndarray):
        p = p.tolist()
    cache = {}
    def mat(dst, src):
        return apply_exp_ixp(dst, src, p, origin, cache)
    def inv_mat(dst, src):
        return apply_exp_ixp(dst, src, [-x for x in p], origin, cache)
    # do not specify grid or otype, i.e., accept all
    return gpt.matrix_operator(mat=mat, adj_mat=inv_mat, inv_mat=inv_mat, adj_inv_mat=mat)