Revision: 4176
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4176&view=rev
Author:   efiring
Date:     2007-11-08 23:25:08 -0800 (Thu, 08 Nov 2007)

Log Message:
-----------
Pylab uses numpy instead of oldnumeric

Modified Paths:
--------------
    trunk/matplotlib/CHANGELOG
    trunk/matplotlib/examples/image_demo2.py
    trunk/matplotlib/examples/mathtext_demo.py
    trunk/matplotlib/examples/mri_with_eeg.py
    trunk/matplotlib/lib/matplotlib/pylab.py

Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG  2007-11-09 02:55:47 UTC (rev 4175)
+++ trunk/matplotlib/CHANGELOG  2007-11-09 07:25:08 UTC (rev 4176)
@@ -1,3 +1,6 @@
+2007-11-08 Made pylab use straight numpy instead of oldnumeric
+           by default - EF
+
 2007-11-08 Added additional record array utilites to mlab (rec2excel,
            rec2gtk, rec_join, rec_append_field, rec_drop_field) - JDH
 
@@ -8,16 +11,22 @@
 2007-11-08 Moved csv2rec to recutils and added other record array
            utilities - JDH
 
-2007-11-08 If available, use existing pyparsing installation - DSD 
+2007-11-08 If available, use existing pyparsing installation - DSD
 
-2007-11-07 Removed old enthought.traits from lib/matplotlib, added 
-           Gael Varoquaux's enthought.traits-2.6b1, which is stripped 
-           of setuptools. The package is installed to site-packages 
+2007-11-07 Removed old enthought.traits from lib/matplotlib, added
+           Gael Varoquaux's enthought.traits-2.6b1, which is stripped
+           of setuptools. The package is installed to site-packages
            if not already available - DSD
 
-2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg 
-           backend and qt4 blitting demo - DSD 
+2007-11-05 Added easy access to minor tick properties; slight mod
+           of patch by Pierre G-M - EF
 
+2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg
+           backend and qt4 blitting demo - DSD
+
+2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg
+           backend and qt4 blitting demo - DSD
+
 2007-10-31 Made log color scale easier to use with contourf;
            automatic level generation now works. - EF
 
@@ -41,7 +50,7 @@
            generator expressions are not supported by python-2.3 - DSD
 
 2007-10-01 Made matplotlib.use() raise an exception if called after
-           backends has been imported.
+           backends has been imported. - EF
 
 2007-09-30 Modified update* methods of Bbox and Interval so they
            work with reversed axes.  Prior to this, trying to
@@ -201,7 +210,7 @@
 
 2007-07-19 completed numpification of most trivial cases - NN
 
-2007-07-19 converted non-numpy relicts troughout the code - NN
+2007-07-19 converted non-numpy relicts throughout the code - NN
 
 2007-07-19 replaced the Python code in numerix/ by a minimal wrapper around
            numpy that explicitly mentions all symbols that need to be

Modified: trunk/matplotlib/examples/image_demo2.py
===================================================================
--- trunk/matplotlib/examples/image_demo2.py    2007-11-09 02:55:47 UTC (rev 
4175)
+++ trunk/matplotlib/examples/image_demo2.py    2007-11-09 07:25:08 UTC (rev 
4176)
@@ -3,7 +3,7 @@
 
 w, h = 512, 512
 s = file('data/ct.raw', 'rb').read()
-A = fromstring(s, UInt16).astype(Float)
+A = fromstring(s, uint16).astype(float)
 A *= 1.0/max(A)
 A.shape = w, h
 

Modified: trunk/matplotlib/examples/mathtext_demo.py
===================================================================
--- trunk/matplotlib/examples/mathtext_demo.py  2007-11-09 02:55:47 UTC (rev 
4175)
+++ trunk/matplotlib/examples/mathtext_demo.py  2007-11-09 07:25:08 UTC (rev 
4176)
@@ -4,7 +4,8 @@
 latex rendering, see the text.usetex option
 """
 import numpy as npy
-from pylab import figure, show
+from matplotlib.pyplot import figure, show
+
 fig = figure()
 fig.subplots_adjust(bottom=0.2)
 
@@ -21,7 +22,8 @@
 
 ax.legend(("Foo", "Testing $x^2$"))
 
-#title(r'$\Delta_i^j \hspace{0.4} \rm{versus} \hspace{0.4} \Delta_{i+1}^j$', 
fontsize=20)
-fig.savefig('mathtext_demo')
+ax.set_title(r'$\Delta_i^j \hspace{0.4} \rm{versus} \hspace{0.4} 
\Delta_{i+1}^j$', fontsize=20)
+#fig.savefig('mathtext_demo')
 
 show()
+

Modified: trunk/matplotlib/examples/mri_with_eeg.py
===================================================================
--- trunk/matplotlib/examples/mri_with_eeg.py   2007-11-09 02:55:47 UTC (rev 
4175)
+++ trunk/matplotlib/examples/mri_with_eeg.py   2007-11-09 07:25:08 UTC (rev 
4176)
@@ -15,7 +15,7 @@
 if 1:   # load the data
     # data are 256x256 16 bit integers
     dfile = 'data/s1045.ima'
-    im = fromstring(file(dfile, 'rb').read(), UInt16).astype(Float)
+    im = fromstring(file(dfile, 'rb').read(), uint16).astype(float)
     im.shape = 256, 256
 
 if 1: # plot the MRI in pcolor
@@ -37,7 +37,7 @@
 if 1:   # plot the EEG
     # load the data
     numSamples, numRows = 800,4
-    data = fromstring(file('data/eeg.dat', 'rb').read(), Float)
+    data = fromstring(file('data/eeg.dat', 'rb').read(), float)
     data.shape = numSamples, numRows
     t = arange(numSamples)/float(numSamples)*10.0
     ticklocs = []

Modified: trunk/matplotlib/lib/matplotlib/pylab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pylab.py    2007-11-09 02:55:47 UTC (rev 
4175)
+++ trunk/matplotlib/lib/matplotlib/pylab.py    2007-11-09 07:25:08 UTC (rev 
4176)
@@ -230,38 +230,6 @@
 # bring all the  symbols in so folks can import them from
 # pylab in one fell swoop
 
-from numpy.oldnumeric import array, zeros, shape, rank, size, fromstring,\
-        take, put, putmask, reshape, repeat, choose, searchsorted,\
-        cumsum, product, cumproduct, alltrue, sometrue, allclose,\
-        arrayrange, arange, asarray, convolve, swapaxes, concatenate,\
-        transpose, sort, argsort, argmax, argmin, innerproduct, dot,\
-        outerproduct, resize, indices, fromfunction, diagonal, trace,\
-        ravel, nonzero, shape, where, compress, clip, zeros, ones,\
-        identity, add, logical_or, exp, subtract, logical_xor,\
-        log, multiply, logical_not, log10, divide, maximum, sin,\
-        minimum, sinh, conjugate, bitwise_and, sqrt, power, bitwise_or,\
-        tan, absolute, bitwise_xor, tanh, negative, ceil, greater, fabs,\
-        greater_equal, floor, less, arccos, arctan2, less_equal, arcsin,\
-        fmod, equal, arctan, hypot, not_equal, cos, around, logical_and,\
-        cosh, arccosh, arcsinh, arctanh, cross_correlate,\
-        pi, ArrayType, matrixmultiply
-
-from numpy.oldnumeric import sum as asum
-
-from numpy.oldnumeric import Int8, UInt8, Int16, UInt16, Int32, UInt32, 
Float32,\
-        Float64, Complex32, Complex64, Float, Int, Complex
-
-from numpy.fft import fft   # Why just fft?
-from numpy.linalg import inv as inverse
-from numpy.oldnumeric.linear_algebra import eigenvectors
-        # not quite the same as linalg.eig
-
-
-pymin, pymax = min, max
-from numpy.oldnumeric.mlab import *
-min, max = pymin, pymax
-from numpy import amin, amax
-
 from matplotlib.mlab import  window_hanning, window_none,\
         conv, detrend, detrend_mean, detrend_none, detrend_linear,\
         polyfit, polyval, entropy, normpdf,\
@@ -271,24 +239,43 @@
         diagonal_matrix, base_repr, binary_repr, log2, ispower2,\
         bivariate_normal, load, save, stineman_interp
 
-from numpy import meshgrid, linspace, logspace, corrcoef, vander
+from numpy import *
+from numpy.fft import *
+from numpy.random import *
+from numpy.linalg import *
 
-"""
-problem syms
- - cross_correlate  - getting from convolve
-average
-sarray
-dump
-dumps
-load
-loads
-divide_safe
-invert
-left_shift
-right_shift
-sign
-"""
+# old style--if True, override standard numpy with oldnumeric
+if False:
+    from numpy.oldnumeric import array, zeros, shape, rank, size, fromstring,\
+            take, put, putmask, reshape, repeat, choose, searchsorted,\
+            cumsum, product, cumproduct, alltrue, sometrue, allclose,\
+            arrayrange, arange, asarray, convolve, swapaxes, concatenate,\
+            transpose, sort, argsort, argmax, argmin, innerproduct, dot,\
+            outerproduct, resize, indices, fromfunction, diagonal, trace,\
+            ravel, nonzero, shape, where, compress, clip, zeros, ones,\
+            identity, add, logical_or, exp, subtract, logical_xor,\
+            log, multiply, logical_not, log10, divide, maximum, sin,\
+            minimum, sinh, conjugate, bitwise_and, sqrt, power, bitwise_or,\
+            tan, absolute, bitwise_xor, tanh, negative, ceil, greater, fabs,\
+            greater_equal, floor, less, arccos, arctan2, less_equal, arcsin,\
+            fmod, equal, arctan, hypot, not_equal, cos, around, logical_and,\
+            cosh, arccosh, arcsinh, arctanh, cross_correlate,\
+            pi, ArrayType, matrixmultiply
 
+    from numpy.oldnumeric import sum as asum
+
+    from numpy.oldnumeric import Int8, UInt8, Int16, UInt16, Int32, UInt32, 
Float32,\
+            Float64, Complex32, Complex64, Float, Int, Complex
+
+    pymin, pymax = min, max
+    from numpy.oldnumeric.mlab import *
+    min, max = pymin, pymax
+    from numpy import amin, amax
+    from numpy.oldnumeric.linear_algebra import eigenvectors
+            # not quite the same as linalg.eig
+    from numpy.linalg import inv as inverse
+
+
 from matplotlib.pyplot import *
 
 


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to