|
From: Sasha <nd...@ma...> - 2006-02-23 07:21:00
|
On 2/23/06, Travis Oliphant <oli...@ie...> wrote: > ... > I have been thinking, however, of replacing it with a super-class that > does not define the dimensions or strides. > Having a simple 1-d array in numpy would be great. In an ideal world I would rather see a 1-d array implemented in C together with a set of array operations that is rich enough to allow trivial implementation of ndarray in pure python. When you say "does not define the dimensions or strides" do you refer to python interface or to C struct? I thought python did not allow to add data members to object structs in subclasses. > In other words, the default array would be just a block of memory. The > standard array would inherit from the default and add dimension and > strides pointers. > If python lets you do it, how will that block of memory know its size? |