[Numpy-discussion] Is this a bug in numpy.ma.reduce?
Friedrich Romstedt
friedrichromstedt@gmail....
Mon Mar 8 13:40:57 CST 2010
2010/3/8 Bruce Southey <bsouthey@gmail.com>:
> Hmm,
> Appears that you have mixed your indices when creating part2plot. If you
> this line instead it works:
> part2plot = argW[j*nx/4:(j+1)*nx/4, i*ny/4:(i+1)*ny/4]
>
>
> I found that by looking the shape of the part2plot array that is component
> of the argW array.
>
> The shape of argW is (320, 200). So in your loops to find part2plot you
> eventually exceed 200 and eventually the index to the second axis is greater
> than 200 causing everything to crash:
> When i=0 or 1 then the shape of part2plot is (50, 80)
> when i=2 then the shape of part2plot is (50, 40)
> when i=3 then the shape of part2plot is (50, 0) # crash
Nice that we have found this out both at the same instance of time
(with 5min precision) :-)
Friedrich
More information about the NumPy-Discussion
mailing list