
Gael Varoquaux wrote:
Yes, indeed. I was just wondering if the PEP could be used for a performant implementation of trees.
That would be a whole new PEP, and one we're not the least bit ready for.
Basicaly that is mapping a tree to an array, which is possible.
Possible, but probably not very useful for dense data -- maybe for sparse arrays? The idea of an array API, rather than (actually in addition to) and array data structure is fabulous! It could be used for sparse arrays, for instance. I do think it's a topic for another PEP, and probably not even a PEP until we have at least some working code - maybe a sparse array and/or PIL image?
So at what level do we propose the API. Single-item access for sure, but what about
array_interface->get_block_from_slice() ?
I think a slicing API is critical -- at least at the Python level, though at the C level is would sure be nice, and probably could allow for some good optimizations for getting a "block" of data out of some odd data structure. "Simple is better than complex." "Although practicality beats purity." "Now is better than never." Tells me that we should just focus on the array data structure for the PEP now. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov