[Numpy-discussion] Latest Array-Interface PEP

Charles R Harris charlesr.harris at gmail.com
Fri Jan 12 02:44:15 EST 2007

On 1/12/07, Gael Varoquaux <gael.varoquaux at normalesup.org> wrote:
> Talking about the difference between the memory access model and the
> array API, maybe I am talking bullshit (I know next to nothing in these
> problems) but couldn' an efficient tree data structure be implemented on
> the memory buffer object ? I am pretty sure a simple tree read-only
> could, as for a tree that is edited, I am not so sure.

Trees are nice, but they are not efficient for array type data. Traversing a
tree usually requires some sort of stack (recursion), and a tree is not well
structured for addressing data using indices. They just aren't appropriate
for arrays, arrays are better represented by some sort of lattice.

Anyhow read-only tree are used a lot by some people. A lab next to mine
> uses them to describe results from there experiment. They store events in
> tree-like structures (I have been told that copied that from the CERN).
> They can then walk throught the tree in a very efficient way, and do
> statistical analysis on their collection of event.

Probably from ROOT?

I am not sure if this can fit anywhere in the PEP, but it would sure
> enlarge its scope.

There is probably a tree module somewhere for python.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070112/d76ad859/attachment.html>

More information about the NumPy-Discussion mailing list