[SciPy-dev] [Numpy-discussion] Records in scipy core
golux at comcast.net
Fri Dec 2 13:45:15 CST 2005
Travis Oliphant wrote:
> Thanks for the example. This is exactly what I'm trying to do.
> The difficulty is that the notion of data type is strongly bound in the
> C implementation of scipy core to a type number describing the array
> descriptor. In fact, currently the C-member of the array object that
> really defines the type is not even a Python object (it's just a
> C-structure). SciPy Core does a much better job of abstracting the
> notion of type in the code than Numeric did, but it's still got some of
> that type_number specific stuff in it. It's part of what makes it hard
> to really abstract the idea of data type and still keep the speed of the
> old code-base.
IMO, this is a perfect example of why the optimizations needed for
numeric arrays are rarely appropriate for general "record" (read
"adaptable object") types, and why IMO a generic record type is
probably almost always a premature optimization -- most domain
objects are more properly modeled in "relational" structures
than "nested" structures (although mapping the relational
structure into a nested structure for *presentation* is often
useful, it's generally best implemented as a view).
My 2 cents.
More information about the Scipy-dev