Revision: 7054
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7054&view=rev
Author:   jdh2358
Date:     2009-04-19 14:26:12 +0000 (Sun, 19 Apr 2009)

Log Message:
-----------
force a copy of the colormap input data

Modified Paths:
--------------
    branches/v0_98_5_maint/lib/matplotlib/colors.py

Modified: branches/v0_98_5_maint/lib/matplotlib/colors.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/colors.py     2009-04-19 14:25:41 UTC 
(rev 7053)
+++ branches/v0_98_5_maint/lib/matplotlib/colors.py     2009-04-19 14:26:12 UTC 
(rev 7054)
@@ -483,7 +483,9 @@
             xa = np.array([X])
         else:
             vtype = 'array'
-            xma = ma.asarray(X)
+            # force a copy here -- the ma.array and filled functions
+            # do force a cop of the data by default - JDH
+            xma = ma.array(X, copy=True)
             xa = xma.filled(0)
             mask_bad = ma.getmask(xma)
         if xa.dtype.char in np.typecodes['Float']:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
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-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to