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

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to