[Numpy-discussion] What Requires C and what is just python
josef.pktd@gmai...
josef.pktd@gmai...
Sun Mar 20 11:02:45 CDT 2011
On Sun, Mar 20, 2011 at 11:49 AM, <josef.pktd@gmail.com> wrote:
> On Sun, Mar 20, 2011 at 11:44 AM, <josef.pktd@gmail.com> wrote:
>> On Sun, Mar 20, 2011 at 11:08 AM, Ben Smith <ben@wbpsystems.com> wrote:
>>>
>>> So, in addition to my computer science work, I'm a PhD student in econ. Right now, the class is using GAUSS for almost everything. This sort of pisses me off because it means people are building libraries of code that become valueless when they graduate (because right now we get GAUSS licenses for free, but it is absurdly expensive later) -- particularly when this is the only language they know.
this looks interesting on this topic:
http://www.vwl.uni-mannheim.de/gaudecker/teaching.htm
Josef
>>>
>>> So, I had this idea of building some command line tools to do the same things using the most basic pieces of NumPy (arrays, dot products, transpose and inverse -- that's it). And it is going great. My problem however is that I'd like to be able to share these tools but I know I'm opening up a big can of worms where I have to go around building numpy on 75 peoples computers. What I'd like to do is limit myself to just the functions that are implemented in python, package it with py2exe and hand that to anyone that needs it. So, my question, if anyone knows, what's implemented in python and what depends on the c libraries? Is this even possible?
>>
>> I think you can package also numpy with py2exe.
>
> I should have explained this first:
> all basic numpy array calculations are in C, extra packages in scipy
> are often in fortran.
> numpy.linalg uses C, but scipy.linalg uses the fortran libraries that
> are the same (LAPACK,..) or similar versions as in GAUSS. numpy.random
> is in C, scipy.special for distribution functions is in C and fortran.
>
> Josef
>
>>
>> Overall I think restricting to pure python is a very bad idea if you
>> want to compete with Gauss.
>> Even for a minimal translation of Gauss programs I need at least numpy
>> and scipy, and statsmodels for the econometrics specific parts. linear
>> algebra, optimization and special functions for distributions look
>> like a minimum to me, and some scipy.signal for time series analysis,
>> and more random numbers than in python`s standard library.
>>
>> Pure python will be slow for this and I doubt you will get anyone to
>> switch from Gauss to pure python.
>> Also, I haven`t seen yet a pure python matrix inverse, or linalg solver.
>>
>> If they want to write their own python programs for analysis and use
>> python later on, then they are much better of getting a full python
>> distribution, EPD, pythonxy or similar. Binary distributions are
>> available and just one click or one command installs.
>> And, for example, using Spyder would be a lot nicer and easier for
>> writing scripts, that are equivalent to Gauss scripts, than using
>> commandline tools.
>>
>> I fully agree with the objective of getting python/numpy/scipy tools
>> to get economists, econometricians to switch from gauss or matlab, but
>> to make it competitive we need enough supporting functions and we need
>> the speed that some Monte Carlo simulations don`t take days instead of
>> hours.
>>
>> I hope you are successful with getting economists or econ students to
>> use python.
>>
>> Josef
>>
>>> Thanks!
>>>
>>> Ben
>>>
>>> --
>>> Ben Smith
>>> Founder / CSA
>>> WBP SYSTEMS
>>> http://www.wbpsystems.com
>>>
>>>
>>> _______________________________________________
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>>
>>
>
More information about the NumPy-Discussion
mailing list