I've a nested list L generated by:
L=Tuples[{{1, 1}, {0, 0}, {1, 0}, {0, 1}}, {n, n}]
For instance, an element of this list is:
$\left( \begin{array}{cc} \{0,1\} & \{1,1\} \\ \{0,1\} & \{1,1\} \\ \end{array} \right).$
Now, for each element of the list $s$, consider for instance the two elements in positions $\{s,1,1,1\}$ and $\{s,2,1,1\}$, in other words the two $0$ in the example above. I'm able to extract those element using:
L[[s]][[All, 1]][[All, 2]]
which delivers $\{0,0\}$.
Here is the question. How do I replace, for all elements of $s$, the sub-elements in those two positions with a new vector, say ${0,1}$?
Note that the example above the element $s$ of $L$ would now look as:
$\left( \begin{array}{cc} \{0,1\} & \{1,1\} \\ \{1,1\} & \{1,1\} \\ \end{array} \right).$
I have tried to use
L[[s]][[All, 1]][[All, 2]]={0,0}
but this returns error
Part specification PR[[1,1,All,All,1]] is longer than depth of object.
I've had no better luck using ReplaceParts.
L[[s]][[All, 1]][[All, 2]]
should deliver{1,1}
and not{0,0}
$\endgroup$