matplotlib/matplotlib — pull request #1095 by efiring (2012-08-16 19:31:39+00:00)
Title: Colormap byteorder bug

Closes #1005.
I considered trying to work around the underlying putmask problem by modifying our _putmask, but concluded this was more trouble than it was worth; the bug seems to involve only the most special and obscure circumstances, which we happened to be triggering when substituting the number slightly less than unity for values of 1.0, and only when the input byte order is not native.
The solution in this pull request is to change the byte order to native before proceding with the putmask and other calculations in the Colormap.__call__() method