@@ -205,7 +205,8 @@ def __call__(self, *args, **kwargs):
205
205
if self .inst is not None and self .inst () is None :
206
206
raise ReferenceError
207
207
elif self .inst is not None :
208
- # build a new instance method with a strong reference to the instance
208
+ # build a new instance method with a strong reference to the
209
+ # instance
209
210
if sys .version_info [0 ] >= 3 :
210
211
mtd = types .MethodType (self .func , self .inst ())
211
212
else :
@@ -458,7 +459,9 @@ def __init__(self, **kwds):
458
459
459
460
def __repr__ (self ):
460
461
keys = self .__dict__ .iterkeys ()
461
- return 'Bunch(%s)' % ', ' .join (['%s=%s' % (k , self .__dict__ [k ]) for k in keys ])
462
+ return 'Bunch(%s)' % ', ' .join (['%s=%s' % (k , self .__dict__ [k ])
463
+ for k
464
+ in keys ])
462
465
463
466
464
467
def unique (x ):
@@ -1507,7 +1510,8 @@ def simple_linear_interpolation(a, steps):
1507
1510
1508
1511
def recursive_remove (path ):
1509
1512
if os .path .isdir (path ):
1510
- for fname in glob .glob (os .path .join (path , '*' )) + glob .glob (os .path .join (path , '.*' )):
1513
+ for fname in glob .glob (os .path .join (path , '*' )) + \
1514
+ glob .glob (os .path .join (path , '.*' )):
1511
1515
if os .path .isdir (fname ):
1512
1516
recursive_remove (fname )
1513
1517
os .removedirs (fname )
@@ -1661,7 +1665,9 @@ def less_simple_linear_interpolation(x, y, xi, extrap=False):
1661
1665
it from there
1662
1666
"""
1663
1667
# deprecated from cbook in 0.98.4
1664
- warnings .warn ('less_simple_linear_interpolation has been moved to matplotlib.mlab -- please import it from there' , DeprecationWarning )
1668
+ warnings .warn ('less_simple_linear_interpolation has been moved to '
1669
+ 'matplotlib.mlab -- please import it from there' ,
1670
+ DeprecationWarning )
1665
1671
import matplotlib .mlab as mlab
1666
1672
return mlab .less_simple_linear_interpolation (x , y , xi , extrap = extrap )
1667
1673
@@ -1672,20 +1678,22 @@ def isvector(X):
1672
1678
it from there
1673
1679
"""
1674
1680
# deprecated from cbook in 0.98.4
1675
- warnings .warn ('isvector has been moved to matplotlib.mlab -- please import it from there' , DeprecationWarning )
1681
+ warnings .warn ('isvector has been moved to matplotlib.mlab -- please '
1682
+ 'import it from there' , DeprecationWarning )
1676
1683
import matplotlib .mlab as mlab
1677
1684
return mlab .isvector (x , y , xi , extrap = extrap )
1678
1685
1679
1686
1680
- def vector_lengths (X , P = 2. , axis = None ):
1687
+ def vector_lengths (X , P = 2.0 , axis = None ):
1681
1688
"""
1682
1689
This function has been moved to matplotlib.mlab -- please import
1683
1690
it from there
1684
1691
"""
1685
1692
# deprecated from cbook in 0.98.4
1686
- warnings .warn ('vector_lengths has been moved to matplotlib.mlab -- please import it from there' , DeprecationWarning )
1693
+ warnings .warn ('vector_lengths has been moved to matplotlib.mlab -- '
1694
+ 'please import it from there' , DeprecationWarning )
1687
1695
import matplotlib .mlab as mlab
1688
- return mlab .vector_lengths (X , P = 2. , axis = axis )
1696
+ return mlab .vector_lengths (X , P = 2.0 , axis = axis )
1689
1697
1690
1698
1691
1699
def distances_along_curve (X ):
@@ -1694,7 +1702,8 @@ def distances_along_curve(X):
1694
1702
it from there
1695
1703
"""
1696
1704
# deprecated from cbook in 0.98.4
1697
- warnings .warn ('distances_along_curve has been moved to matplotlib.mlab -- please import it from there' , DeprecationWarning )
1705
+ warnings .warn ('distances_along_curve has been moved to matplotlib.mlab '
1706
+ '-- please import it from there' , DeprecationWarning )
1698
1707
import matplotlib .mlab as mlab
1699
1708
return mlab .distances_along_curve (X )
1700
1709
@@ -1705,7 +1714,8 @@ def path_length(X):
1705
1714
it from there
1706
1715
"""
1707
1716
# deprecated from cbook in 0.98.4
1708
- warnings .warn ('path_length has been moved to matplotlib.mlab -- please import it from there' , DeprecationWarning )
1717
+ warnings .warn ('path_length has been moved to matplotlib.mlab '
1718
+ '-- please import it from there' , DeprecationWarning )
1709
1719
import matplotlib .mlab as mlab
1710
1720
return mlab .path_length (X )
1711
1721
@@ -1716,7 +1726,8 @@ def is_closed_polygon(X):
1716
1726
it from there
1717
1727
"""
1718
1728
# deprecated from cbook in 0.98.4
1719
- warnings .warn ('is_closed_polygon has been moved to matplotlib.mlab -- please import it from there' , DeprecationWarning )
1729
+ warnings .warn ('is_closed_polygon has been moved to matplotlib.mlab '
1730
+ '-- please import it from there' , DeprecationWarning )
1720
1731
import matplotlib .mlab as mlab
1721
1732
return mlab .is_closed_polygon (X )
1722
1733
@@ -1727,7 +1738,8 @@ def quad2cubic(q0x, q0y, q1x, q1y, q2x, q2y):
1727
1738
it from there
1728
1739
"""
1729
1740
# deprecated from cbook in 0.98.4
1730
- warnings .warn ('quad2cubic has been moved to matplotlib.mlab -- please import it from there' , DeprecationWarning )
1741
+ warnings .warn ('quad2cubic has been moved to matplotlib.mlab -- please '
1742
+ 'import it from there' , DeprecationWarning )
1731
1743
import matplotlib .mlab as mlab
1732
1744
return mlab .quad2cubic (q0x , q0y , q1x , q1y , q2x , q2y )
1733
1745
@@ -1763,7 +1775,8 @@ def __call__(self, key):
1763
1775
raise ValueError ("Iterator has been left behind" )
1764
1776
return retval
1765
1777
1766
- # This can be made more efficient by not computing the minimum key for each iteration
1778
+ # This can be made more efficient by not computing the minimum key for each
1779
+ # iteration
1767
1780
iters = [myiter (it ) for it in iterables ]
1768
1781
minvals = minkey = True
1769
1782
while 1 :
@@ -1782,7 +1795,8 @@ def is_math_text(s):
1782
1795
s = unicode (s )
1783
1796
except UnicodeDecodeError :
1784
1797
raise ValueError (
1785
- "matplotlib display text must have all code points < 128 or use Unicode strings" )
1798
+ "matplotlib display text must have all code points < 128 or use "
1799
+ "Unicode strings" )
1786
1800
1787
1801
dollar_count = s .count (r'$' ) - s .count (r'\$' )
1788
1802
even_dollars = (dollar_count > 0 and dollar_count % 2 == 0 )
0 commit comments