I have a Numpy array like this,
[[1 2 3
2 0 0
3 0 0]]
and I want to turn it into this form,
[[1 2 2 3 3
2 0 0 0 0
2 0 0 0 0
3 0 0 0 0
3 0 0 0 0]]
My idea is to extract the sub-array contains zero from the original array, and use Kronecker product to get the sub-array, which is in the array I want. But I have no idea to get the first row and column of the output array.
How to achieve this goal? Please give me any suggestions.