Hi Mike, <div><br></div><div>ipython-physics looks like a good, relatively simple solution.  I would assume that we would use this *instead* of sympy to prevent having to add yet-another-dependency and end up packaging this right with yt.  (ip-p seems to be unlicensed yet 'placed in the public domain', which is weird since the public domain is not a legal construct everywhere.  We would need to ask them about that before including in yt.)</div>


<div><br></div><div>That said, I think a sympy solution would end up being more powerful ultimately.  Additionally, ip-p definitely needs some clean up before inclusion.  At quick glance they seems to use camel case for some functions, their main class NumberDict subclasses from dict (huge no-no, collections.MutableMapping people!), all of the _addUnit() calls at the end of the file should be hard coded into _unit_table (or a mapped call), they seem to be definitely using eval() wrong by not having an empty globals dict which captures builtins, and the unit comments never seem to be used (so why have them?).  And they have no tests!</div>

<div><br></div><div>So I would be in favor a rewrite of ip-p, but sympy would be better ;)</div><div><br></div><div>Be Well</div><div>Anthony<br><br><div class="gmail_quote">On Fri, Oct 5, 2012 at 7:24 PM, Michael Kuhlen <span dir="ltr"><<a href="mailto:mqk@astro.berkeley.edu" target="_blank">mqk@astro.berkeley.edu</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi yt gang<br><br>Just had a little chat with Matt, and he suggested I bring up <a href="https://bitbucket.org/birkenfeld/ipython-physics" target="_blank">ipython-physics</a> for discussion. Sounds like unit handling is an issue that needs to be addressed in yt. I've found ipython-physics to be pretty neat and quite usable. Maybe this is something worth tying into yt? Matt also mentioned that Casey had written a sympy-based library for handling units; how does it compare to what ipython-physics does?<br>



<br>Mike<span><font color="#888888"><br><br>-- <br>*********************************************************************<br>*                                                                   *<br>*  Dr. Michael Kuhlen              Theoretical Astrophysics Center  *<br>



*  email: <a href="mailto:mqk@astro.berkeley.edu" target="_blank">mqk@astro.berkeley.edu</a>   UC Berkeley                      *<br>*  cell phone: <a href="tel:%28831%29%20588-1468" value="+18315881468" target="_blank">(831) 588-1468</a>      B-116 Hearst Field Annex # 3411  *<br>


*  skype username: mikekuhlen      Berkeley, CA 94720               *<br>
*                                                                   *<br>*********************************************************************<br>
</font></span><br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div>