SyntaxFix
Write A Post
Hire A Developer
Questions
I am not sure I understood your question, but if you write:
mask_data[:3, :3] = 1 mask_data[3:, 3:] = 0
This will make all values of mask data whose x and y indexes are less than 3 to be equal to 1 and all rest to be equal to 0