[SciPy-dev] [SciPy-user] efficiently importing ascii data
jonathan.taylor at utoronto.ca
Sat Nov 19 15:20:50 CST 2005
If I were you I would pick up K&R's C programming language. It is short
and concice. Try to forget everything you know about python when you
learn C as.
Once you understand some basic C you will prob want to read Guido's
python extension documentation.
It will probabally be a lot easier to understand what is going on after
The sample chapter of Travis's book also gives away a few implementation
On 11/19/2005, "Darren Dale" <dd55 at cornell.edu> wrote:
>Hi Travis, All,
>> > The other thing that needs to be done is that string (and unicode)
>> > arrays need to convert to the numeric types, easily. This would let you
>> > read in a string array and convert to numeric types quite cleanly.
>> > Right now, this doesn't work simply because the wrong generic functions
>> > are getting called in the conversion routines. This can and should be
>> > changed, however. The required code to change is in arraytypes.inc.src.
>> > I could see using PyInt_FromString, PyLong_FromString,
>> > PyFloat_FromString, and calling the complex python function for
>> > constructing complex numbers from a string. Code would need to be
>> > written to fully support Long double and complex long double conversion,
>> > but initially they could just punt and use the double conversions.
>> > Alternatively, sscanf could be called when available for the type, and
>> > the other approaches used when it isn't.
>> > Anybody want a nice simple project to get themselves up to speed with
>> > the new code base :-)
>> I'll look into it (after hours, just started a new job). I haven't worked
>> much with C or wrapping C, and I need to learn sometime.
>Now that I have studied the source, I'm not sure I am up to this. Between
>trying to learn C and wade through the (what appears to me) extremely
>abstracted source code, I might as well deciphering Linear A.
>There wouldn't be, by chance, a developers guide to hacking scipy, would
>Scipy-dev mailing list
>Scipy-dev at scipy.net
More information about the Scipy-dev