Suppose I have the following two numpy arrays:
In [251]: m=np.array([[1,4],[2,5],[3,6]])
In [252]: m
Out[252]:
array([[1, 4],
[2, 5],
[3, 6]])
In [253]: c= np.array([200,400])
In [254]: c
Out[254]: array([200, 400])
I would like to get the following array in one step, but for the life of me I cannot figure it out:
In [252]: k
Out[252]:
array([[200, 800, 400, 1600],
[400, 1000, 800, 2000],
[600, 1200, 1200,2400]])