[yt-dev] ipython-physics

Anthony Scopatz scopatz at gmail.com
Fri Oct 5 21:59:56 PDT 2012


Hi Mike,

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.)

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!

So I would be in favor a rewrite of ip-p, but sympy would be better ;)

Be Well
Anthony

On Fri, Oct 5, 2012 at 7:24 PM, Michael Kuhlen <mqk at astro.berkeley.edu>wrote:

> Hi yt gang
>
> Just had a little chat with Matt, and he suggested I bring up
> ipython-physics <https://bitbucket.org/birkenfeld/ipython-physics> 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?
>
> Mike
>
> --
> *********************************************************************
> *                                                                   *
> *  Dr. Michael Kuhlen              Theoretical Astrophysics Center  *
> *  email: mqk at astro.berkeley.edu   UC Berkeley                      *
> *  cell phone: (831) 588-1468      B-116 Hearst Field Annex # 3411  *
> *  skype username: mikekuhlen      Berkeley, CA 94720               *
> *                                                                   *
> *********************************************************************
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20121005/13104880/attachment.html>


More information about the yt-dev mailing list