[Matplotlib-users] Re: performance of imshow and numarray

Jeff,

I am copying this to John and Charlie so they will know that all known imshow-related problems have been resolved (correct?). (Also to the devel list, just in case.) This and the previous message were not copied to either of the lists.

What is the difference between numpy.ma and the other masked array implementations that caused the exception? Is this something that should be fixed in numpy.ma?

Thanks.

Eric

Jeff Whitaker wrote:

···

Andrew Jaffe wrote:

Andrew: (val-vmin)/float(vmax-vmin) should be equivalent to the original, since I believe vmin and vmax are always scalars.

BTW: you can trigger the numpy.ma/imshow problem by uncommenting the 'colorbar(im)' line in the image_masked.py example. With the original

result = (1.0/(vmax-vmin))*(val-vmin)
line in colors.py, it will throw an exception with numpy 0.9.5, but

result = (val-vmin)/float(vmax-vmin)

works.

-Jeff

Jeff,

Great -- thanks!

Will you commit this change to CVS?

Andrew

Done.

-Jeff