On Thu, Nov 12, 2009 at 11:33 AM, andy2O <and...@hotmail.com> wrote:
>
>
>
> On Nov 12, 2:24 pm, smichr <smi...@gmail.com> wrote:
>> I'm just looking for some feedback about what is useful to see in the
>> documentation. I've finished making all imports explicit in the *py
>> files and am wondering what is most useful to see in the
>> documentation.
>>
>> What should the following be replaced with:
>>
>> >>> from sympy import *
>> >>> var('x')
>> >>> print sqrt(x)
>
> *Personally*, I'd suggest staying with 'from sympy import *' because
> the context is sympy as an interactive maths environment and keeping
> the code simple and compact is best to introduce sympy. It makes sympy
> work more like Mathematica and Maple which users may be used to.
>
> I would leave instruction on best practice in Python scripting to
> comments in the documentation web pages and other Python tutorials.
> People will look at the sympy help text to learn how to use sympy's
> functions, not as a general introduction to best practice in full
> Python scripting.
>
> (This is just a personal opinion, so please take or leave this as you
> like)

There is a problem with mixing sympy and numpy together. E.g. for
example we use it in femhub (femhub.org) and it is a source of common
confusion, if sin(x) is a symbolic sin(x), or if it is numeric (numpy)
sin(x). E.g.

from sympy import *
from numpy import *

is simply confusing. So, I would do it the other way round --- I would
put there a note that you can use isympy, where things are imported
for you automatically, but in documentation I would use explicit
imports, so that users can just copy & paste it in their scripts and
it would work.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to