Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8539b65

Browse files
committed
removed pylab load and save
svn path=/branches/v0_99_maint/; revision=7396
1 parent dce0739 commit 8539b65

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

CHANGELOG

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
12
2009-08-03 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS
23

3-
======================================================================
4+
5+
2009-08-03 pylab no longer provides a load and save function. These
6+
are available in matplotlib.mlab, or you can use
7+
numpy.loadtxt and numpy.savetxt for text files, or np.save
8+
and np.load for binary numpy arrays. - JDH
49

510
2009-07-31 Tagging 0.99.0.rc1 at 7314 - MGD
611

doc/api/api_changes.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ list may help describe what changes may be necessary in your code.
1818
.. _configobj: http://www.voidspace.org.uk/python/configobj.html
1919
.. _`enthought.traits`: http://code.enthought.com/projects/traits
2020

21-
Changes beyond 0.98.x
22-
=====================
21+
Changes in 0.99
22+
======================
23+
24+
* pylab no longer provides a load and save function. These are
25+
available in matplotlib.mlab, or you can use numpy.loadtxt and
26+
numpy.savetxt for text files, or np.save and np.load for binary
27+
numpy arrays.
2328

2429
* User-generated colormaps can now be added to the set recognized
2530
by :func:`matplotlib.cm.get_cmap`. Colormaps can be made the

lib/matplotlib/pylab.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@
236236
base_repr, binary_repr, log2, ispower2, \
237237
rec_append_fields, rec_drop_fields, rec_join, csv2rec, rec2csv, isvector
238238

239+
import matplotlib.mlab as mlab
240+
import matplotlib.cbook as cbook
241+
239242
from numpy import *
240243
from numpy.fft import *
241244
from numpy.random import *
@@ -248,3 +251,25 @@
248251
import numpy as np
249252
import numpy.ma as ma
250253

254+
def load(*args, **kwargs):
255+
raise NotImplementedError(load.__doc__)
256+
load.__doc__ = """\
257+
pylab no longer provides a load function, though the old pylab
258+
function is still available as matplotlib.mlab.load (you can refer
259+
to it in pylab as "mlab.load"). However, for plain text files, we
260+
recommend numpy.loadtxt, which was inspired by the old pylab.load
261+
but now has more features. For loading numpy arrays, we recommend
262+
numpy.load, and its analog numpy.save, which are available in
263+
pylab as np.load and np.save.
264+
"""
265+
266+
267+
def save(*args, **kwargs):
268+
raise NotImplementedError(save.__doc__)
269+
save.__doc__ = """\
270+
pylab no longer provides a save function, though the old pylab
271+
function is still available as matplotlib.mlab.save (you can still
272+
refer to it in pylab as "mlab.save"). However, for plain text
273+
files, we recommend numpy.savetxt. For saving numpy arrays,
274+
we recommend numpy.save, and its analog numpy.load, which are
275+
available in pylab as np.save and np.load."""

0 commit comments

Comments
 (0)