I tried with below and got same result as previous one:
p=np.array([[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]],
[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]],
[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]]])
q=np.array([[0, 2, 1],
[3, 7, 5],
[9, 7, 6]])
Below statement i used to update the value
p[p<q]=130
result:
array([[[ 0, 130, 2],
[ 3, 130, 5],
[130, 7, 8]],
[[ 0, 130, 2],
[ 3, 130, 5],
[130, 7, 8]],
[[ 0, 130, 2],
[ 3, 130, 5],
[130, 7, 8]]])
Hope this will help.....
p=np.array([[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]],
[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]],
[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]]])
q=np.array([[0, 2, 1],
[3, 7, 5],
[9, 7, 6]])
Below statement i used to update the value
p[p<q]=130
result:
array([[[ 0, 130, 2],
[ 3, 130, 5],
[130, 7, 8]],
[[ 0, 130, 2],
[ 3, 130, 5],
[130, 7, 8]],
[[ 0, 130, 2],
[ 3, 130, 5],
[130, 7, 8]]])
Hope this will help.....