
Suppose you are trying to create a synthetic image 10x10 represented by a matrix of values (numpy array). This image has three blocked sections. In the upper left block, columns 0-4 and rows 0-4, the value will be 1. the right block, columns 5-9 and rows 0-9, will be 0. the remaining area, columns 0-4 and row 5-9, will be 2.(see attached image)
What is the fastest way to create such an object? I understand that you could create an array of zeros and iteratively change the values in each column, but I also understand this is not an efficient method. I assume it involves simply generating the array using np.array, but I'm not quite sure of the syntax.