|
From: <ef...@us...> - 2009-05-06 23:03:06
|
Revision: 7088
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7088&view=rev
Author: efiring
Date: 2009-05-06 23:02:57 +0000 (Wed, 06 May 2009)
Log Message:
-----------
Spelling correction and other minor cleanups in mlab
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/mlab.py
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py 2009-05-06 20:52:55 UTC (rev 7087)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2009-05-06 23:02:57 UTC (rev 7088)
@@ -175,14 +175,7 @@
import matplotlib.nxutils as nxutils
import matplotlib.cbook as cbook
-# set is a new builtin function in 2.4; delete the following when
-# support for 2.3 is dropped.
-try:
- set
-except NameError:
- from sets import Set as set
-
def linspace(*args, **kw):
warnings.warn("use numpy.linspace", DeprecationWarning)
return np.linspace(*args, **kw)
@@ -617,12 +610,10 @@
:func:`polyval`
polyval function
"""
- warnings.warn("use numpy.poyfit", DeprecationWarning)
+ warnings.warn("use numpy.polyfit", DeprecationWarning)
return np.polyfit(*args, **kwargs)
-
-
def polyval(*args, **kwargs):
"""
*y* = polyval(*p*, *x*)
@@ -899,14 +890,8 @@
"""
warnings.warn("Use numpy.trapz(y,x) instead of trapz(x,y)", DeprecationWarning)
return np.trapz(y, x)
- #if len(x)!=len(y):
- # raise ValueError, 'x and y must have the same length'
- #if len(x)<2:
- # raise ValueError, 'x and y must have > 1 element'
- #return np.sum(0.5*np.diff(x)*(y[1:]+y[:-1]))
-
def longest_contiguous_ones(x):
"""
Return the indices of the longest stretch of contiguous ones in *x*,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|