From: <jd...@us...> - 2008-07-17 19:16:55
|
Revision: 5781 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5781&view=rev Author: jdh2358 Date: 2008-07-17 19:15:58 +0000 (Thu, 17 Jul 2008) Log Message: ----------- more fixes for numpy svn deprecation warnings Modified Paths: -------------- trunk/matplotlib/examples/pylab_examples/nan_test.py trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py trunk/matplotlib/lib/matplotlib/__init__.py trunk/matplotlib/src/_backend_gdk.c trunk/matplotlib/src/_path.cpp trunk/matplotlib/src/_png.cpp trunk/matplotlib/src/cntr.c trunk/matplotlib/src/nxutils.c Modified: trunk/matplotlib/examples/pylab_examples/nan_test.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/nan_test.py 2008-07-17 18:56:48 UTC (rev 5780) +++ trunk/matplotlib/examples/pylab_examples/nan_test.py 2008-07-17 19:15:58 UTC (rev 5781) @@ -22,8 +22,7 @@ plot(t, s, '-', lw=2) xlabel('time (s)') -ylabel('voltage (mV)') -title('More NaNs at 0.0 and 1.0') +ylabel('more nans') grid(True) show() Modified: trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py 2008-07-17 18:56:48 UTC (rev 5780) +++ trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py 2008-07-17 19:15:58 UTC (rev 5781) @@ -40,6 +40,7 @@ # Or use the default, which is transparent: col = ax.pcolormesh(Qx,Qz,Zm) ax.set_title('With masked values') -show() + savefig("quadmesh_demo") +show() Modified: trunk/matplotlib/lib/matplotlib/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/__init__.py 2008-07-17 18:56:48 UTC (rev 5780) +++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-07-17 19:15:58 UTC (rev 5781) @@ -89,7 +89,7 @@ """ from __future__ import generators -__version__ = '0.98.2' +__version__ = '0.98.3' __revision__ = '$Revision$' __date__ = '$Date$' Modified: trunk/matplotlib/src/_backend_gdk.c =================================================================== --- trunk/matplotlib/src/_backend_gdk.c 2008-07-17 18:56:48 UTC (rev 5780) +++ trunk/matplotlib/src/_backend_gdk.c 2008-07-17 19:15:58 UTC (rev 5781) @@ -28,7 +28,7 @@ PyGObject *py_pixbuf; GdkPixbuf *gdk_pixbuf; PyArrayObject *array; - int dims[3] = { 0, 0, 3 }; + npy_intp dims[3] = { 0, 0, 3 }; if (!PyArg_ParseTuple(args, "O!:pixbuf_get_pixels_array", &PyGdkPixbuf_Type, &py_pixbuf)) Modified: trunk/matplotlib/src/_path.cpp =================================================================== --- trunk/matplotlib/src/_path.cpp 2008-07-17 18:56:48 UTC (rev 5780) +++ trunk/matplotlib/src/_path.cpp 2008-07-17 19:15:58 UTC (rev 5781) @@ -846,7 +846,7 @@ ::clip_to_rect(path, x0, y0, x1, y1, inside, results); - int dims[2]; + npy_intp dims[2]; dims[1] = 2; PyObject* py_results = PyList_New(results.size()); if (!py_results) Modified: trunk/matplotlib/src/_png.cpp =================================================================== --- trunk/matplotlib/src/_png.cpp 2008-07-17 18:56:48 UTC (rev 5780) +++ trunk/matplotlib/src/_png.cpp 2008-07-17 19:15:58 UTC (rev 5781) @@ -249,7 +249,7 @@ - int dimensions[3]; + npy_intp dimensions[3]; dimensions[0] = height; //numrows dimensions[1] = width; //numcols dimensions[2] = 4; Modified: trunk/matplotlib/src/cntr.c =================================================================== --- trunk/matplotlib/src/cntr.c 2008-07-17 18:56:48 UTC (rev 5780) +++ trunk/matplotlib/src/cntr.c 2008-07-17 19:15:58 UTC (rev 5781) @@ -1333,7 +1333,7 @@ { PyObject *point, *all_contours; PyArrayObject *xv, *yv; - int dims[1]; + npy_intp dims[1]; int i; long j, k; @@ -1343,8 +1343,8 @@ for (i = 0; i < nparts; i++) { dims[0] = np[i]; - xv = (PyArrayObject *) PyArray_FromDims(1, dims, PyArray_DOUBLE); - yv = (PyArrayObject *) PyArray_FromDims(1, dims, PyArray_DOUBLE); + xv = (PyArrayObject *) PyArray_SimpleNew(1, dims, PyArray_DOUBLE); + yv = (PyArrayObject *) PyArray_SimpleNew(1, dims, PyArray_DOUBLE); if (xv == NULL || yv == NULL) goto error; for (j = 0; j < dims[0]; j++) { @@ -1370,7 +1370,7 @@ { PyObject *all_contours; PyArrayObject *xyv; - int dims[2]; + npy_intp dims[2]; int i; long j, k; @@ -1381,7 +1381,7 @@ { dims[0] = np[i]; dims[1] = 2; - xyv = (PyArrayObject *) PyArray_FromDims(2, dims, PyArray_DOUBLE); + xyv = (PyArrayObject *) PyArray_SimpleNew(2, dims, PyArray_DOUBLE); if (xyv == NULL) goto error; for (j = 0; j < dims[0]; j++) { Modified: trunk/matplotlib/src/nxutils.c =================================================================== --- trunk/matplotlib/src/nxutils.c 2008-07-17 18:56:48 UTC (rev 5780) +++ trunk/matplotlib/src/nxutils.c 2008-07-17 19:15:58 UTC (rev 5781) @@ -108,7 +108,7 @@ PyObject *xypointsarg, *vertsarg, *ret; PyArrayObject *xypoints, *verts; PyArrayObject *mask; - int dimensions[1]; + npy_intp dimensions[1]; if (! PyArg_ParseTuple(args, "OO", &xypointsarg, &vertsarg)) return NULL; @@ -187,7 +187,7 @@ npoints = xypoints->dimensions[0]; dimensions[0] = npoints; - mask = (PyArrayObject *)PyArray_FromDims(1,dimensions,PyArray_INT); + mask = (PyArrayObject *)PyArray_SimpleNew(1,dimensions,PyArray_INT); if (mask==NULL) { Py_XDECREF(verts); Py_XDECREF(xypoints); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |