[Numpy-discussion] basearray / arraykit
Christopher Barker
Chris.Barker at noaa.gov
Thu May 11 09:15:01 EDT 2006
Travis Oliphant wrote:
> 1) Implement a base-array with no getitem method nor setitem method at all
>
> 2) Implement a sub-class that supports only creation of data-types
> corresponding to existing Python scalars (Boolean, Long-based integers,
> Double-based floats, complex and object types). Then, all array
> accesses should return the underlying Python objects.
> This sub-class should also only do view-based indexing (basically it's
> old Numeric behavior inside of NumPy).
> Item 1) should be pushed for inclusion in 2.6 and possibly even
> something like 2)
+ sys.maxint
Having even this very basic n-d object in the standard lib would be a
MAJOR boon to python.
However, as I think about it, one reason I'd really like to see an
nd-array in python is as a standard way to pass binary data around.
Right now, I'm working with the GDAL lib for geo-referenced raster
images, PIL, numpy and wxPython. I'm making a lot of copies to and from
python strings to pass the binary data back and forth. If all these libs
used the same nd-array, this would be much more efficient. However, that
would require non-python data types, most notably a byte (or char,
whatever) type.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the NumPy-Discussion
mailing list