|
From: John H. <jd...@gm...> - 2009-03-11 18:22:09
|
On Wed, Mar 11, 2009 at 3:25 AM, Reinier Heeres <re...@he...> wrote: > Hi, > > I updated my patch a bit more, and now all tests are running (try > "python axes3d.py"). Only the contourf3D is not working correctly yet, > but I'm sure it's fixable soon. There are also some obvious bugs (e.g. > the semi-3D histograms are not depth-sorted). > > Anyway, I have applied the commit in a different git repo that also > has gitweb.cgi for viewing: > > http://qtwork.nano.tudelft.nl/cgi-bin/gitweb.cgi?p=users/rwh/mplot3d;a=summary > > Jon, I got rid of the spurious commit-and-revert entries but included > your latest commits; perhaps you can clone from this tree now? > > Although I've not had a close look at the BSD license it definitely > sounds like a good idea to add it if it applies to the original code. > Shall we try to work to some sort of easily-installable form of the > again-working code? One thing you can do is send a patch against lib/mpl-toolkits and I'll apply it to svn trunk. I was briefly scrolling through the recent diffs on art3d, and noticed + try: + zs = float(zs) + zs = [zs for i in range(len(paths))] + except: + pass Except in very special cases, we do not allow blanket excepts -- eg you should catch explicitly the error you are trying to trap. Also, it is usually better to try just the part you are trying to catch and then do the rest in an else. So if you are trying to catch the case where zs is not a float try: zs = float(zs) except TypeError: pass else: zs = [zs for i in range(len(paths))] Also, again I am not excatly sure what you are trying to do here, mpl has "duck typing" helpers to test whether something is iterable or num-like. So you can do import matplotlib.cbook as cbook if not cbook.iterable(zs): zs =float(zs) zs = [zs for i in range(len(paths))] Anyway -- great work so far. I'm having trouble making a git co work so I am looking forward to testing this when you have a snapshot or svn diff. JDH |