Re: Bug of PolynomialExpansion ?

2016-05-30 Thread Sean Owen
The 2-degree expansion of (x,y,z) is, in this implementation: (x, x^2, y, xy, y^2, z, xz, yz, z^2) Given your input is (1,0,1), the output (1,1,0,0,0,1,1,0,1) is right. On Mon, May 30, 2016 at 12:37 AM, Jeff Zhang wrote: > I use PolynomialExpansion to convert one vector to

Bug of PolynomialExpansion ?

2016-05-29 Thread Jeff Zhang
I use PolynomialExpansion to convert one vector to 2-degree vector. I am confused about the result of following. As my understanding, the 2 degrees vector should contain 4 1's, not sure how the 5 1's come from. I think it supposed to be (x1,x2,x3) *(x1,x2,x3) = (x1*x1, x1*x2, x1*x3, x2*x1,x2*x2,