What is the “correct” way of creating a 2D numpy “rect” array, like:
0000000000000000000
0000000000000000000
0000000000111110000
0000000000111110000
0000000000111110000
0000000000000000000
i.e. an array which has a given value inside certain bounds, or zero otherwise?
Just create an array of zeros and set the area you want to one.
E.g.
This yields: