Actually slicing the way you suggested improved it to some extent. I
did profile on this and I observed that it reduced the number of calls
for __get_item__ and improved the timing to some extent. Which was
useful to some extent.
Thanks again.
--
http://mail.python.org/mailman/listinfo/python-li
[EMAIL PROTECTED] wrote:
> What is the fastest way to code this particular block of code below..
> I used numeric for this currently and I thought it should be really
> fast..
> But, for large sets of data (bx and vbox) it takes a long time and I
> would like to improve.
>
> vbox = array(m) (size
[EMAIL PROTECTED] wrote:
> vbox = array(m) (size: 1000x1000 approx)
> for b in bx:
> vbox[ b[1], b[0]:b[2] ] = 0
> vbox[ b[3], b[0]:b[2] ] = 0
> vbox[ b[1]:b[3], b[0] ] = 0
> vbox[ b[1]:b[3], b[2] ] = 0
This may not help, but you could try to minimize the number of times you
call
What is the fastest way to code this particular block of code below..
I used numeric for this currently and I thought it should be really
fast..
But, for large sets of data (bx and vbox) it takes a long time and I
would like to improve.
vbox = array(m) (size: 1000x1000 approx)
for b in bx:
vbo