Revision: 5780
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5780&view=rev
Author: jdh2358
Date: 2008-07-17 18:56:48 +0000 (Thu, 17 Jul 2008)
Log Message:
-----------
some fixes for numpy svn deprecation warnings
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
trunk/matplotlib/lib/mpl_toolkits/exceltools.py
trunk/matplotlib/src/_path.cpp
trunk/matplotlib/src/_png.cpp
trunk/matplotlib/src/ft2font.cpp
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-07-17
18:27:36 UTC (rev 5779)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-07-17
18:56:48 UTC (rev 5780)
@@ -459,7 +459,8 @@
if Gcf.get_num_fig_managers()==0 and \
not matplotlib.is_interactive() and \
gtk.main_level() >= 1:
- gtk.main_quit()
+ #gtk.main_quit()
+ pass
def show(self):
# show the figure window
Modified: trunk/matplotlib/lib/mpl_toolkits/exceltools.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/exceltools.py 2008-07-17 18:27:36 UTC
(rev 5779)
+++ trunk/matplotlib/lib/mpl_toolkits/exceltools.py 2008-07-17 18:56:48 UTC
(rev 5780)
@@ -5,7 +5,7 @@
import matplotlib.mlab as mlab
import mpl_toolkits.exceltools as exceltools
-
+
r = mlab.csv2rec('somefile.csv', checkrows=0)
formatd = dict(
@@ -52,7 +52,7 @@
return format
-def rec2excel(r, ws, formatd=None, rownum=0, colnum=0):
+def rec2excel(r, ws, formatd=None, rownum=0, colnum=0, nanstr='NaN'):
"""
save record array r to excel pyExcelerator worksheet ws
starting at rownum. if ws is string like, assume it is a
@@ -62,6 +62,7 @@
formatd is a dictionary mapping dtype name -> mlab.Format instances
+ nanstr is the string that mpl will put into excel for np.nan value
The next rownum after writing is returned
"""
@@ -106,7 +107,7 @@
ws.write(rownum, colnum+i, val)
else:
if mlab.safe_isnan(val):
- ws.write(rownum, colnum+i, 'NaN')
+ ws.write(rownum, colnum+i, nanstr)
else:
ws.write(rownum, colnum+i, val, format.xlstyle)
rownum += 1
Modified: trunk/matplotlib/src/_path.cpp
===================================================================
--- trunk/matplotlib/src/_path.cpp 2008-07-17 18:27:36 UTC (rev 5779)
+++ trunk/matplotlib/src/_path.cpp 2008-07-17 18:56:48 UTC (rev 5780)
@@ -857,7 +857,7 @@
{
size_t size = p->size();
dims[0] = p->size();
- PyArrayObject* pyarray = (PyArrayObject*)PyArray_FromDims(2, dims,
PyArray_DOUBLE);
+ PyArrayObject* pyarray = (PyArrayObject*)PyArray_SimpleNew(2,
dims, PyArray_DOUBLE);
for (size_t i = 0; i < size; ++i)
{
((double *)pyarray->data)[2*i] = (*p)[i].x;
Modified: trunk/matplotlib/src/_png.cpp
===================================================================
--- trunk/matplotlib/src/_png.cpp 2008-07-17 18:27:36 UTC (rev 5779)
+++ trunk/matplotlib/src/_png.cpp 2008-07-17 18:56:48 UTC (rev 5780)
@@ -254,7 +254,7 @@
dimensions[1] = width; //numcols
dimensions[2] = 4;
- PyArrayObject *A = (PyArrayObject *) PyArray_FromDims(3, dimensions,
PyArray_FLOAT);
+ PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(3, dimensions,
PyArray_FLOAT);
for (png_uint_32 y = 0; y < height; y++) {
Modified: trunk/matplotlib/src/ft2font.cpp
===================================================================
--- trunk/matplotlib/src/ft2font.cpp 2008-07-17 18:27:36 UTC (rev 5779)
+++ trunk/matplotlib/src/ft2font.cpp 2008-07-17 18:56:48 UTC (rev 5780)
@@ -274,7 +274,7 @@
/*
- PyArrayObject *A = (PyArrayObject *) PyArray_FromDims(2, dimensions,
PyArray_UBYTE);
+ PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(2, dimensions,
PyArray_UBYTE);
unsigned char *src = _buffer;
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins