From: <jd...@us...> - 2008-05-17 21:32:41
|
Revision: 5180 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5180&view=rev Author: jdh2358 Date: 2008-05-17 14:32:33 -0700 (Sat, 17 May 2008) Log Message: ----------- Merged revisions 5178-5179 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint ........ r5178 | jdh2358 | 2008-05-17 16:28:34 -0500 (Sat, 17 May 2008) | 1 line updated the coding guide to encourage svnmerge ........ r5179 | jdh2358 | 2008-05-17 16:30:23 -0500 (Sat, 17 May 2008) | 1 line a few more doc string fixes in cboo ........ Modified Paths: -------------- trunk/matplotlib/CODING_GUIDE trunk/matplotlib/lib/matplotlib/cbook.py Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Name: svnmerge-integrated - /branches/v0_91_maint:1-4816,5172 + /branches/v0_91_maint:1-4816,5172,5178-5179 Modified: trunk/matplotlib/CODING_GUIDE =================================================================== --- trunk/matplotlib/CODING_GUIDE 2008-05-17 21:30:23 UTC (rev 5179) +++ trunk/matplotlib/CODING_GUIDE 2008-05-17 21:32:33 UTC (rev 5180) @@ -41,10 +41,30 @@ MANIFEST.in. This file determines what goes into the src distribution of the mpl build. + * Keep the maintenance branch and trunk in sync here it makes sense. + If there is a bug on both that needs fixing, use svnmerge.py to + fix them. http://www.orcaware.com/svn/wiki/Svnmerge.py. The + basic procedure is: + + - get a svn copy of the branch (svn co + https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint) + and the trunk (svn co + https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib) + + - Michael advises making the change on the branch and committing + it. Make sure you svn upped on the trunk and have no local + modifications, and then from the svn trunk do + + # where these are the revision numbers. ranges also acceptable + > svnmerge.py merge -rNNN1,NNN2 + # this file is automatically created by the merge command + > svn commit -F svnmerge-commit-message.txt + == Importing and name spaces == For numpy, use: + import numpy as np a = np.array([1,2,3]) Modified: trunk/matplotlib/lib/matplotlib/cbook.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cbook.py 2008-05-17 21:30:23 UTC (rev 5179) +++ trunk/matplotlib/lib/matplotlib/cbook.py 2008-05-17 21:32:33 UTC (rev 5180) @@ -198,21 +198,25 @@ return dict([ (val, 1) for val in x]).keys() def iterable(obj): + 'return true if obj is iterable' try: len(obj) except: return 0 return 1 def is_string_like(obj): + 'return true if obj looks like a string' if hasattr(obj, 'shape'): return 0 try: obj + '' except (TypeError, ValueError): return 0 return 1 def is_writable_file_like(obj): + 'return true if obj looks like a file object' return hasattr(obj, 'write') and callable(obj.write) def is_scalar(obj): + 'return true if ob is not string like and is not iterable' return is_string_like(obj) or not iterable(obj) def is_numlike(obj): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |