<br><br><div class="gmail_quote">On Wed, Aug 25, 2010 at 8:19 AM, Jason McCampbell <span dir="ltr"><<a href="mailto:jmccampbell@enthought.com">jmccampbell@enthought.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Chuck,<div><br></div><div>I will update the wiki page on the Numpy developer site that discusses the refactoring this week.  Right now what's there reflects our plans before they met the reality of code.  Needless to say, the actual implementation differs in some of the details.</div>

<div><br></div><div>Here is a very brief overview of the structure:</div><div><br></div><div>- The libndarray directory now contains all of the code for the 'core' library.  This library is independent of Python and implements most of the array, descriptor, iterator, and ufunc functionality.  The goal is that all non-trivial behavior should be in here, but in reality some parts are tied fairly tightly to the CPython interpreter and will take more work to move into the core.</div>

<div><br></div><div>- numpy/core/src/multiarray and numpy/core/src/umath now implement "just" the CPython interface to libndarray.  We have preserved both the Python interface and the C API.  Ideally each C API function is just a simple wrapper around a call to the core API, though it doesn't always work out that way. However, a large amount of code has been moved out of these modules into the core.</div>

<div><br></div><div>- The core is built as a shared library that is independent of any given interface layer.  That is, the same shared library/DLL can be used with CPython, IronPython and any other implementation.  Each interface is required to pass in a set of callbacks for handling reference counting, object manipulation, and other interface-specific behavior.</div>

<div><br></div></blockquote><div><br>How do you manage PyCapsule/PyCObject? I don't recall how deeply they were used but ISTR that they were used below the top level interface layer in several places.<br><br><snip><br>
<br>Chuck<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div></div><br></blockquote></div>