I have a one dimensional array, lets say:
import numpy as np
inp_vec = np.array([1, 2, 3])
Now, I would like to construct a matrix of the form
[[1 - 1, 1 - 2, 1 - 3],
[2 - 1, 2 - 2, 2 - 3],
[3 - 1, 3 - 2, 3 - 3]])
Of course it can be done with for loops but is there a more elegant way to do this?