From: Friedrich R. <fri...@gm...> - 2010-03-05 20:36:59
|
2010/3/5 David Goldsmith <d_l...@ya...>: > I think it's a bug in numpy.ma._extrema_operations.reduce (at least Pierre GM couldn't explain it away and instructed me to file a bug ticket on it over there, which I did; w/ your permission, I'll add your code to that ticket?) - at the very least, it should be able to handle zero-size arrays more robustly (i.e., w/out raising an exception) IMO. Of course, that doesn't mean that once it's been fixed, imshow (or cm, which is apparently what's really calling it) won't encounter some other problem on account of the fix, but I guess we'll have to cross that bridge when we come to it? Hmm, IMO it's correct to raise because the minimum of nothing isn't defined? Matplotlib tries to find a minimum. Anyway, you cannot draw ndarrays arr with 0 in arr.shape. So I think matplotlib should maybe silently skip attempting to draw it? Friedrich |