I have a 2D numpy array and I have a arrays of rows and columns which should be set to a particular value. Lets consider the following example
a = array([[1
First off, your description of the "correct" array doesn't match the columns and rows you specify...
To get your "correct" array, you'd do this:
a[:2, 2] = 0
To modify the second and third columns of the first and third rows, (rows [0,2] and columns [1,2]) you'd do what you're doing... (Your description of modifying rows [0,2] and columns [1,2] is exactly the result you get, right?)