I want to use power series to approximate some PDEs. The first step I need to generate symbolic multivariate polynomials, given a numpy ndarray.
Consider the polynomial below: <https://i.stack.imgur.com/eBQVK.png> I want to take a m dimensional ndarray of D=[d1,...,dm] where djs are non-negative integers, and generate a symbolic multivariate polynomial in the form of symbolic expression. The symbolic expression consists of monomials of the form: <https://i.stack.imgur.com/pvDDT.png> Fo example if D=[2,3] the output should be <https://i.stack.imgur.com/nDhGD.png> For this specific case I could nest two for loops and add the expressions. But I don't know what to do for Ds with arbitrary length. If I could generate the D dimensional ndarrays of A and X without using for loops, then I could use np.sum(np.multiply(A,X)) as Frobenius inner product <https://en.wikipedia.org/wiki/Frobenius_inner_product> to get what I need. I would appreciate if you could help me know how to do this in SymPy. Thanks in advance. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/97cc8ff9-ec93-4ef4-acb1-e63032279f50%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
