I am trying to figure out how to pad an array using the pattern shown below:
0000
0 000
00 00
000 0
0000
For example:
[[1,2,3],
[4,5,6],
[7,8,9]]
Would become:
[[1,2,3,0,0],
[0,4,5,6,0],
[0,0,7,8,9]]
I figured out how to do it using manual looping but I feel like there is probably a much faster way that uses numpy's array manipulation functions, I just can't figure out how to do it.