[Numpy-discussion] Questions about the array interface.
Tim Hochberg
tim.hochberg at cox.net
Thu Apr 7 14:31:11 EDT 2005
Scott Gilbert wrote:
>--- Chris Barker <Chris.Barker at noaa.gov> wrote:
>
>
[SNIP]
>
>>As a rule of thumb, I think there will be [more] consumers of arrays
>>than producers, so I'd rather make it easy on the consumers that the
>>producers, if we need to make such a trade off. Maybe I'm biased,
>>because I'm a consumer.
>>
>>
>>
>
>I don't see the trade off. It will be easy for you either way, but harder
>for array producers (admittedly only a little).
>
>
I think there is a trade off, but not the one that Chris is worried
about. It should be easy to hide complexity of dealing with missing
attributes through the various helper functions. The cost will be in
speed and will probably be most noticable in C extensions using small
arrays where the extra code to check if an attribute is present will be
signifigant.
How signifigant this will be, I'm not sure. And frankly I don't care all
that much since I generally only use large arrays. However, since one of
the big faultlines between Numarray and Numeric involves the former's
relatively poor small array performance, I suspect someone might care.
-tim
>This has to be easier than the situation you have today right? Imagine the
>code you'd have to write to special case Numeric, scipy.base, Numarray, and
>Python's array module.
>
>
>
More information about the NumPy-Discussion
mailing list