[Numpy-discussion] rewriting NumPy code in C or C++ or similar

Jason McCampbell jmccampbell at enthought.com
Mon Mar 14 13:09:05 EDT 2011


Hi Dan,

I am just catching up with the mailing list after falling behind getting a
release.  I am the PM for Enthought's part of refactoring NumPy.  The first
phase of the refactoring project is done except for some clean up and the
new version of NumPy is quite stable.  (25 regression failures against the
core, largely corner cases).  If you want to take a look at it, the code is
in the Numpy github repository: https://github.com/numpy/numpy-refactor

<https://github.com/numpy/numpy-refactor>Under the root of the tree, look in
the 'libndarray' directory.  This is the Python-independent core and might
be helpful for what you are trying to do. It has not been released as a part
of an official numpy release yet (under consideration as the core of 2.0)
but has been released as the first beta version of NumPy and SciPy for .NET.

Regards,
Jason


On Mon, Mar 7, 2011 at 5:36 PM, Dan Halbert <halbert at halwitz.org> wrote:

> We currently have some straightforward NumPy code that indirectly
> implements a C API defined by a third party. We built a Cython layer that
> directly provides the API in a .a library, and then calls Python. The
> layering looks like this:
>
>  C main program -> API in Cython -> Python -> NumPy
>
> This is difficult to package for distribution, because of the Python and
> NumPy dependencies. We may need to reimplement our library so it factors out
> the Python dependency, and I would like to explore the alternatives.
> (Performance may also be a reason to do this, but that is not the main issue
> right now.)
>
> Do you all have some recommendations about tools, libraries, or languages
> that you have used to rewrite NumPy code easily into something that's more
> self-contained and callable from C? For instance, are there some nice C++
> linear algebra libraries that map closely to NumPy? Or is there some
> higher-level compiled array language that looks something like NumPy code? I
> apologize if the answers are obvious: I am not very familiar with the tools
> in this space.
>
> Thanks,
> Dan
>
> (I saw the NumPy Refactoring project discussion from earlier. When that is
> finished, the resulting Python-independent library might be a nice way to
> handle this, but I am thinking shorter-term.)
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
*Jason McCampbell*
Enthought, Inc.
512.850.6069
jmccampbell at enthought.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110314/6e4d3b2d/attachment.html>


More information about the NumPy-Discussion mailing list