I have an array reproduced below, when I plot it I get a sawtooth wave, I am looking for a square wave output, ie when the value the 11th value in the second column should decrease in value. I am looking for a way to do this without manually reshaping everytime.
For example I have this:
[[ 0. 0. ]
[ 0. 0.1]
[ 0. 0.2]
[ 0. 0.3]
[ 0. 0.4]
[ 0. 0.5]
[ 0. 0.6]
[ 0. 0.7]
[ 0. 0.8]
[ 0. 0.9]
[ 0.1 0. ]
[ 0.1 0.1]
[ 0.1 0.2]
[ 0.1 0.3]
[ 0.1 0.4]
[ 0.1 0.5]
[ 0.1 0.6]
[ 0.1 0.7]
[ 0.1 0.8]
[ 0.1 0.9]
I want this:
[[ 0. 0. ]
[ 0. 0.1]
[ 0. 0.2]
[ 0. 0.3]
[ 0. 0.4]
[ 0. 0.5]
[ 0. 0.6]
[ 0. 0.7]
[ 0. 0.8]
[ 0. 0.9]
[ 0.1 0.9]
[ 0.1 0.8]
[ 0.1 0.7]
[ 0.1 0.6]
[ 0.1 0.5]
[ 0.1 0.4]
[ 0.1 0.3]
[ 0.1 0.2]
[ 0.1 0.1]
[ 0.1 0.0]