Re: [Numpy-discussion] Best representation for array of points, or, how to distinguish a Nx1 array of points from a Nx3 array of scalars

2007-10-04 Thread Edson Tadeu
TED]> wrote: > > On Thu, Oct 04, 2007 at 11:47:40AM -0500, Robert Kern wrote: > > Edson Tadeu wrote: > > > > > * Is there any field in the NumPy object where I can keep this > > > information (the shape of the "element"), without creeping it with th

[Numpy-discussion] Best representation for array of points, or, how to distinguish a Nx1 array of points from a Nx3 array of scalars

2007-10-04 Thread Edson Tadeu
I've found that there are two ways to represent an array of 3D points: # 01: N = 4 a = numpy.zeros((N, 3), dtype='f8') # 02: N = 4 b = numpy.zeros(N, dtype='3f8') The second representation seems "conceptually" better, it is really an 1D array of N elements ( i.e., b.shape == (4,) ), but, "in