I need to create several arrays from a vector x. Each element in the vector needs to be of the power 0,1,2,...,n. A array with 3 elements should yield 3 arrays, with power 0,1,2.
x=numpy.array([1,2,3])
n=len(x)
for i in range(n):
print(x**i)
Yields:
[1 1 1]
[1 2 3]
[1 4 9]
When I would like to have:
array([1, 1, 1]),
array([1, 2, 3]),
array([1, 4, 9])