It seems that the colormaps are now modifying inplace the input
arguments:
resting ~ $ ipython -pylab
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
Type "copyright", "credits" or "license" for more information.
IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
Welcome to pylab, a matplotlib-based Python environment.
For more information, type 'help(pylab)'.
In [1]: import numpy as np
In [2]: from pylab import cm
In [3]: values = np.linspace(0., 1., 3)
In [4]: values
Out[4]: array([ 0. , 0.5, 1. ])
In [5]: _ = cm.summer(values)
In [6]: values
Out[6]: array([ 0. , 128. , 255.9999744])
I think this is very bad. I don't see where it is mentionned in the
docstring, but even if it were, I still would disapprove.
My 2 cents,
Ga�l