[IronPython] RE: Numpy port

Michael Gogins gogins at pipeline.com
Wed Aug 31 15:20:09 CEST 2005


I wouldn't call the FORTRAN "legacy code". People are still using BLAS and such because the FORTRAN code performs better. These routines have been rewritten many times in C, C++, and Java and people still use the FORTRAN simply because it does a better job. Numerical solutions are what FORTRAN was originally designed for.

In other words, better to find some way to wrap BLAS for IronPython or CLR rather than rewrite the routines yet again.

Regards,
Mike Gogins

-----Original Message-----
From: Jeffrey Sax <jeffrey at extremeoptimization.com>
Sent: Aug 31, 2005 3:14 AM
To: thane at magna-capital.com, 
	'Discussion of IronPython' <users-ironpython.com at lists.ironpython.com>
Subject: RE: [IronPython] RE: Numpy port

I had a look at this a few months ago. Both numarray and Numeric use an
amorphous char array for storage. A simple wrapper would mean a lot of
unmanaged memory moving around... not a desirable situation.
 
It seems to me that a rewrite using generics is most appropriate. The CLR
generics should take a lot of the hard work out of the code, since the
current C code spends a lot of time bookkeeping and converting to and from
the element type. There are some special cases currently handled by
numarray, like misaligned data and byte-swapped data. IMO these should be
handled at I/O time, if possible.
 
The biggest part of numpy is the large library of legacy code (mostly in
FORTRAN) for which numpy provides interfaces. I don't know enough about
Python's interop mechanisms to know the best way to port these.
 
Jeffrey Sax
Extreme Optimization
http://www.extremeoptimization.com
  _____  

From: users-ironpython.com-bounces at lists.ironpython.com
[mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of
Thane
Sent: August 27, 2005 6:24 PM
To: 'Discussion of IronPython'
Subject: [IronPython] RE: Numpy port



There are two approaches: 1) wrap the unmanaged API in managed C++, or, 2)
rewrite the library in managed code (IronPython?).  Also, I think the
Numeric library would be preferable to Numpy, although I'd bet Numpy has a
larger user base.  Option 1 could be done fairly quickly, but option 2 is
the best long-term solution.

 

Several years ago I wrote a COM wrapper for many of the Numpy functions
without too much pain.  Wait, it was MFC.  There must have been a lot of
pain; I've just forgotten about it :-)

 

 

 

Math:  Do you (does anyone?) have an idea of what it would take to port
Numpy, etc, to .NET?  I'm not much of a C programmer (I can do it, but I
can't really do big, UNIX-y projects), and have never studied the problems
of porting it to MC++ or C++/CLI.

 

  _____  

From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin
Maly
Sent: Fri 8/26/2005 11:11 AM

The bug ... I assume it is in the "-X:TabCompletion" console, correct? I
am going to look into it.







More information about the Ironpython-users mailing list