Allin, thanks a lot, that's great news.
Il giorno dom, 27/01/2013 alle 18.37 +0100, Sven Schreiber ha scritto:
Am 27.01.2013 17:47, schrieb Allin Cottrell:
> On Sun, 27 Jan 2013, Sven Schreiber wrote:
>
>> Not a big issue, but this treats Python as somehow equivalent to Numpy.
>> I wonder whether this should be made explicit, also given that the
>> "import numpy" line is hidden. So maybe 'language=numpy' or
'nppython'?
>
> I'd be OK with 'language=numpy' if people think that's better,
> although I'd say the _language_ is python.
Sure, but Python doesn't speak arrays without numpy, so it's both
together that form the numerical language. So "python-numpy"? (which is
also the name of the debian package BTW).
I personally do not agree. The language you will write is simply python,
which, for an implementational detail, uses numpy. I don't think the
user is even necessarily assumed to know this is happening, until she
just reads the docs. Unless there really are any reason why we should
want an additional python "flavour" supported, I think the simplest
alternative, "language=python", is the best.
The user can, moreover, do "import numpy" again, or even "import numpy
as whatever", as suggested, without any damage.
If we really want to be very picky (and in my opinion we don't really
need to), probably the cleanest solution would be to move the "import
numpy as np" line _inside_ each function, so that the "np" name is not
used outside them. This is not exactly nice Python code, but I can't
think of a better solution.
While I'm at it: I guess that now most of the work needed to also have a
python console running in gretl is done? Let me point out that if that
was the case, it would be great to be able to choose _which_ console to
use (for instance "ipython" instead than simple "python").
thanks
Pietro