« first day (3796 days earlier)      last day (1138 days later) » 
00:00 - 20:0020:00 - 21:00

8:00 PM
The answer I've decided on is "kill it with fire"
 
@Aran-Fey well based on my expert judgement your issue is typing-related, so... :P
 
@AnnZen excellent, thanks
@AnnZen minor style note: you don't need the np.array inside the other one on line 14, you can just use a list on the inside
 
thanks, didn't know that
 
@AnnZen so are you trying to make the loops on line 17-19 faster?
 
8:07 PM
yes
 
If you have to plot each rectangle (for each array element) separately it won't get much faster. You might be able to switch the double loop with a single one but the end result will be the same. You can't use vectorized numpy if your functionality needs elements one by one.
 
ohk, thanks
 
If I'm reading it correctly that your arrays have shape (200, 200, 4) and (200, 200, 3), respectively, then you can do for b, col in zip(self.rects.reshape(200*200, -1), array.reshape(200*200, -1)): .... Of course in your real code you'll want to name that 200 so that there aren't any magic numbers floating around in your code.
(If the 3 and 4 in the shapes are fixed you can also use self.rects.reshape(-1, 4) and array.reshape(-1, 3))
 
00:00 - 20:0020:00 - 21:00

« first day (3796 days earlier)      last day (1138 days later) »