[Ironpython-users] numpy in IronPython

Markus Schaber m.schaber at codesys.com
Tue Jun 10 17:03:01 CEST 2014


Hi, Jeff,

Von: Jeff Hardy
> On Tue, Jun 3, 2014 at 1:39 PM, Doug Blank <doug.blank at gmail.com> wrote:
>> 2) A pure-Python version would be a lot of work (perhaps building on PyPy's RPython version and converting their C) and be slow, but would be little maintenance as most of the details for the current version of numpy would be static. Requires generic Python skills to develop (a large group of people have these skills; any generic Python implementation could use).

> Anything that we can share with the PyPy/Jython teams will be a huge advantage. Having a pure-Python implementation would at least allow it to work, even if it wouldn't be fast (except on PyPy). It might also be a huge amount of work, but if it's shared between three smallish communities it might not be too bad.

I think one of the problems is to avoid the boxing of doubles to objects when they're stored in arrays / vectors.

> I just don't know enough about the architecture of numpy to say for sure - which parts are Python, which are Cython, and which are hand-written CPython modules. If they're going to depend on Cython, it's worth investing in a C# backend for that (unless we can generate cross-platform C++, but .NET Native might make that irrelevant anyway). It would also enable the wonderful Pandas library, hopefully. Getting an idea from the numpy team where they're headed would be a good idea before investing too much work in any case.

As far as I can see, IronPython is JITted after being translated by the DLR. Maybe we could enhance that process to involve some type inference (similar to RPython) where possible, and to use Cython style type hints.

With the appropriate type mappings (and possibly some hints), this could allow an "pure" Python version to get full .NET speed (e. G. by using .NET arrays of .NET double instead of python arrays).



Best regards

Markus Schaber

CODESYS® a trademark of 3S-Smart Software Solutions GmbH 

Inspiring Automation Solutions 
________________________________________
3S-Smart Software Solutions GmbH 
Dipl.-Inf. Markus Schaber | Product Development Core Technology 
Memminger Str. 151 | 87439 Kempten | Germany 
Tel. +49-831-54031-979 | Fax +49-831-54031-50 

E-Mail: m.schaber at codesys.com | Web: codesys.com | CODESYS store: store.codesys.com 
CODESYS forum: forum.codesys.com 

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 


More information about the Ironpython-users mailing list