I have two arrays which are column and row values in PDF coordinate space:
x = array([111, 303, 405, 513]
y = array([523, 546 , 569 , 603 ])
Here's a visual:
I need to convert this into a list of numpy arrays, where each array is the boundary coordinates (four points that define the box). For example, a list of the lower left and upper right boxes would be
all_boxes =
[array([[111, 523],
[303, 523],
[303, 546],
[111, 546]], dtype=int64),
array([[405, 569],
[513, 569],
[513, 603],
[405, 603]], dtype=int64)]
And so on for nine boxes. How can I achieve this? I would guess some kind of NumPy multiplication but I can't see it. Thank you.