How to replace some values from one list to another of same type?
<p>I've a problem with arranging and replacing python lists or arrays. 
I've two arrays, let say a and b as,    </p>

<pre><code>a = [[ 0.   0.  -2.5  0. ]
     [ 0.   0.  -2.   0. ]
     [ 0.   0.  -1.5  0. ]
       ...............,
     [ 2.5  2.   1.   0. ]
     [ 2.5  2.   1.5  0. ]
     [ 2.5  2.   2.   0. ]]    
</code></pre>

<p>There is a total of 300 lines with 4 elements each line. where it arrange as <code>[ x y z val ]</code>, 
that means for each x,y,z point I've a value 'val' which initializes as zero for 300 
points. x,y,z have minimum and maximum values x-min = 0, x-max = 2.5; y-min = 0, y-max = 2.0; z-min=-2.5, z-max=2.0.     </p>

<p>I've another list, b as    </p>

<pre><code>b = [[  0.         0.        -2.5       21.793416  ] 
     [  0.         0.5       -2.5       20.30 ] 
     [  0.         1.        -2.5       16.66   ] 
     [  0.         1.5        2.       -16.61 ] 
     [  0.         2.        -2.5        9.06  ] 
     [  0.         2.        -2.         9.81  ] 
     [  0.         2.        -1.5        9.65   ] 
     [  1.5        2.         0.5       -4.42  ] 
     [  1.5        2.         1.        -7.44  ] 
     [  1.5        2.         2.        -8.89  ] 
     [  2.         0.        -2.5       13.26  ] 
     [  2.         0.         1.5       -9.81  ] 
     [  2.5        2.         0.5       -1.60 ]
     [  2.5        2.         1.        -3.48 ]
     [  2.5        2.         2.        -5.20  ]]    
</code></pre>

<p>b is smaller than a (let say 15 points) and have the same type as above <code>[x y z val]</code> where the <strong>val</strong> here are not zero.     </p>

<p>Now I need to insert the val of <code>b</code> for the corresponding x,y,z in to the <code>a</code>. That means for equivalent [x y z] points I need to replace the value of val from b to a. Which will modify the list a.     </p>
