From: <ef...@us...> - 2008-04-24 18:31:15
|
Revision: 5073 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5073&view=rev Author: efiring Date: 2008-04-24 11:31:10 -0700 (Thu, 24 Apr 2008) Log Message: ----------- Enforce numpy >= 1.1 and python >= 2.3 when importing matplotlib. Numpy svn passes the test now. Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/__init__.py trunk/matplotlib/lib/matplotlib/transforms.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008-04-24 17:57:57 UTC (rev 5072) +++ trunk/matplotlib/CHANGELOG 2008-04-24 18:31:10 UTC (rev 5073) @@ -1,3 +1,7 @@ + +2008-04-24 Make numpy 1.1 and python 2.3 required when importing + matplotlib - EF + 2008-04-24 Fix compilation issues on VS2003 (Thanks Martin Spacek for all the help) - MGD @@ -3443,4 +3447,4 @@ 2003-11-21 - make a dash-dot dict for the GC 2003-12-15 - fix install path bug -t \ No newline at end of file +t Modified: trunk/matplotlib/lib/matplotlib/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/__init__.py 2008-04-24 17:57:57 UTC (rev 5072) +++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-04-24 18:31:10 UTC (rev 5073) @@ -112,10 +112,13 @@ #else: _have_pkg_resources = True if not _python23: - def enumerate(seq): - for i in range(len(seq)): - yield i, seq[i] + raise SystemExit('matplotlib requires Python 2.3 or later') +import numpy +nn = numpy.__version__.split('.') +if not (int(nn[0]) >= 1 and int(nn[1]) >= 1): + raise SystemExit( + 'numpy >= 1.1 is required; you have %s' % numpy.__version__) def is_string_like(obj): if hasattr(obj, 'shape'): return 0 Modified: trunk/matplotlib/lib/matplotlib/transforms.py =================================================================== --- trunk/matplotlib/lib/matplotlib/transforms.py 2008-04-24 17:57:57 UTC (rev 5072) +++ trunk/matplotlib/lib/matplotlib/transforms.py 2008-04-24 18:31:10 UTC (rev 5073) @@ -693,10 +693,7 @@ if len(xy) == 0: return - try: - xym = ma.masked_invalid(xy) # maybe add copy=False - except AttributeError: # masked_invalid not exposed in npy 1.04 - xym = ma.masked_where(~npy.isfinite(xy), xy) + xym = ma.masked_invalid(xy) # maybe add copy=False if (xym.count(axis=1)!=2).all(): return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |