I have two vectors. I need the function "cross product" -esque, which will take each value from the first vector and raise it to the exponent of each value in the second vector, returning the matrix. Is there something built into numpy that does this? This can be done with loops, but I'm looking for something effective.
For example:
>>> cross_exp([1,2], [3,4])
[[1, 1],[8, 16]]
source
share