user - 4 years ago 95

Python Question

Suppose I have a vertical vector X = [1,[2],[3]] and integer pow = 2.

Is there a function in numpy where it will return a matrix of each row of vector x raised from a power of 0 to pow (pow = 2)

The above example should return a matrix

`[[1, 1, 1],`

[1, 2, 4],

[1, 3, 9]]

I looked at numpy.power, however returns an array.

Recommended for you: Get network issues from **WhatsUp Gold**. **Not end users.**

Recommended from our users: **Dynamic Network Monitoring from WhatsUp Gold from IPSwitch**. ** Free Download**