On Tue, 30 Jun 2020 at 16:34, Nicolas Guarin <[email protected]> wrote: > > I would recommend use the star import for interactive CAS work, otherwise I > would second Aaron in using > > import sympy as sym
Okay maybe we should go with this. It's less ambiguous than the other variants and is potentially more meaningful/recognisable to people who aren't familiar with the short names of other python libraries and perhaps to matlab users as well. I guess that the py is sort of redundant inside a .py file. If we want to endorse this as the suggested short spelling then we could start by adding it as a suggestion and discussing other options like star-import somewhere near the start of the tutorial: https://docs.sympy.org/latest/tutorial/intro.html#the-power-of-symbolic-computation We could also add "import sympy as sym" as part of the startup in isympy. Then examples of code that use that style would work if pasted in. I notice that numpy doc examples seem to be written with an implied "import numpy as np": https://numpy.org/doc/stable/reference/generated/numpy.sin.html The tutorial there shows "import numpy as np" as the very first line of code and then mostly uses np throughout: https://numpy.org/doc/stable/user/quickstart.html I don't know if that's something that we should emphasise more generally in docs. I do often see users on stackoverflow etc mixing up things like math.sin, numpy.sin and sympy.sin. Oscar -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxRRcn-rQCmMyXPYHPWrSjBU4qCX%2BLM%2BcP-UgWNtF9NBnA%40mail.gmail.com.
