def vandermonde(order, dim=1, syms='a b c d'):
    syms = syms.split()
    n = len(syms)
    if n < dim:
        new_syms = []
        for i in range(dim - n):
            j, rem = divmod(i, n)
            new_syms.append(syms[rem] + str(j))
        syms.extend(new_syms)
    terms = []
    for i in range(order + 1):
        terms.extend(comb_w_rep(dim, i))
    rank = len(terms)
    V = zeros(rank)
    generators = [symbol_gen(syms[i]) for i in range(dim)]
    all_syms = []
    for i in range(rank):
        row_syms = [next(g) for g in generators]
        all_syms.append(row_syms)
        for j, term in enumerate(terms):
            v_entry = 1
            for k in term:
                v_entry *= row_syms[k]
            V[i*rank + j] = v_entry
    return V, all_syms, terms
Serializes a value and caches it to an entity with a given key.
dataset/ETHPy150Open sympy/sympy/examples/intermediate/vandermonde.py/vandermonde--crossover with--dataset/ETHPy150Open google/simian/src/simian/mac/models/base.py/KeyValueCache.SetSerializedItem