import numpy as np
x = np.array([1,2,3])
xlist = []
Xlist = []
for i in range(1):
xlist.append(x**(i+1))
Xlist.append(xlist)
xlist.append(x**2)
Xlist.append(xlist)
Xlist
However, the output is
[[array([1, 2, 3]), array([1, 4, 9])], [array([1, 2, 3]), array([1, 4, 9])]]
However, I don't know why the result isn't the expression below, and I want the result below, how to achieve that?
[[array([1, 2, 3])], [array([1, 2, 3]), array([1, 4, 9])]]