[Numpy-discussion] Re-implementation of Python Numerical arrays (Numeric) available for download
Travis Oliphant
oliphant.travis at ieee.org
Fri Nov 16 18:42:02 CST 2001
>
> While we think this version is not yet mature enough for
> most to use in everyday projects, we are interested in
> feedback on the user interface and the open issues (see
> the documents on the web page shown below). We also welcome
> those who would like to contribute to this effort by helping
> with the development or adding libraries.
>
What I've seen looks great. You've all done some good work here.
Of course, I do have some feedback. I haven't looked at everything, these
points have just caught my eye.
Complex Types:
==============
1) I don't like the idea of complex types being a separate subclass of
ndarray. This makes them "different." Unless this "difference" can be
completely hidden (which I doubt), I would prefer complex types to be on the
same level as other numeric types.
2) Also, in your C-API, you have a different pointer to the imaginary data.
I much prefer the way it is done currently to have complex numbers
represented as an 8-byte, or 16-byte chunk of contiguous memory.
Index Arrays:
===========
1) For what it's worth, my initial reaction to your indexing scheme is
negative. I would prefer that if
a = [[1,2,3,4],
[5,6,7,8],
[9,10,11,12],
[13,14,15,16]]
then
a[[1,3],[0,3]] returns the sub-matrix:
[[ 4, 6],
[ 12, 14]
i.e. the cross-product of [1,3] x [0,3] This is the way MATLAB works. I'm
not sure what IDL does.
If I understand your scheme, right now, then I would have to append an extra
dimension to my indexing arrays to get this behavior, right?
2) I would like to be able to index the array in a flattenned sense as well
(is that possible?) in other words, it would be nice if a[flat(9,10,11)] or
something got me the elements 9,10,11 in a one-dimensional interpretation of
the array.
3) Why can't you combine slice notation and indexing? Just interpret the
slice as index array that would be created from using tha range operator on
the same start, stop, and step objects. Is this the plan?
That's all for now. I don't mean to be critical, I'm really impressed with
what works so far. These are just some concerns I have right now.
-Travis Oliphant
More information about the Numpy-discussion
mailing list