Having two arrays like:
a = np.zeros((3, 4), dtype=int)
[[0 0 0 0]
[0 0 0 0]
[0 0 0 0]]
b = np.ones((2, 3), dtype=int)
[[1 1 1]
[1 1 1]]
How to assign from a source array (b) to the entries in the destination array (a) that are present in source ?
The resulting array should then be:
[[1 1 1 0]
[1 1 1 0]
[0 0 0 0]]