Re: RFC 272 (v1) Arrays: transpose()

2000-09-23 Thread Jeremy Howard
[EMAIL PROTECTED] wrote: > How about (if perl6 allows passing arrays implicitly by reference > without arglist flattening) > > transpose @arr, $a, $b; # xchg > transpose @arr, {$a => $b}; # mv > transpose @arr, [0,3,4,1,2]; # PDL reorder > You know, I had just logged in to pos

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-23 Thread Karl Glazebrook
Ilya Zakharevich wrote: > > On Sat, Sep 23, 2000 at 10:41:07AM +1100, Jeremy Howard wrote: > > Many Perl users operate on lists of data. Requiring explicit loops every > > time a programmer wants to operate on a list is asking the programmer to fit > > in with how a computer thinks. That's not r

Re: RFC 272 (v1) Arrays: transpose()

2000-09-23 Thread Karl Glazebrook
Jeremy Howard wrote: > > BTW, I notice that you're using dimension numbering starting at 0 for your > transpose() examples. Is everyone happy to start at 0 rather than 1? OF COURSE!! anything else would be WRONG

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-23 Thread Karl Glazebrook
[EMAIL PROTECTED] wrote: > > Ilya Zakharevich wrote: > > ...Do you say you are confused by using vectors (=scalars) instead of > > arrays? > > I'm not having a problem with that personally but *many* users of PDL > have complained about being confused by this. > They assume ndim == array == perl

Re: RFC 272 (v1) Arrays: transpose()

2000-09-23 Thread Jeremy Howard
Karl Glazebrook wrote: > Jeremy Howard wrote: > > > > BTW, I notice that you're using dimension numbering starting at 0 for your > > transpose() examples. Is everyone happy to start at 0 rather than 1? > > OF COURSE!! > > anything else would be W

Re: RFC 272 (v1) Arrays: transpose()

2000-09-23 Thread Karl Glazebrook
Jeremy Howard wrote: > > Karl Glazebrook wrote: > > Jeremy Howard wrote: > > > > > > BTW, I notice that you're using dimension numbering starting at 0 for > your > > > transpose() examples. Is everyone happy to start at 0 rather than 1? > > > > OF COURSE!!!

Re: RFC 272 (v1) Arrays: transpose()

2000-09-23 Thread c . soeller
Jeremy Howard wrote: > So where is mv(), you ask? If you use the 'reorder' syntax, but don't > specify all of the dimensions in the list ref, then the remaining dimensions > are added in order: That sounds good. I'd say why not also allow the mv syntax? It is syntactically different from the oth

Re: RFC 272 (v1) Arrays: transpose()

2000-09-23 Thread c . soeller
Karl Glazebrook wrote: > the arguments to reshape should be sizes not last elements (i.e. N's > not N-1's). Yup, it's simple: size (N) vs index range (0..N-1) > How does this sound? Logical and consistent ;) Christian

Re: RFC 272 (v1) Arrays: transpose()

2000-09-23 Thread c . soeller
Jeremy Howard wrote: > (I'm not assuming the no-flattening thing, since that's another source of > angst altogether!) What is the no-flattening thing? Christian

Implementing RFC 272

2000-09-23 Thread Buddha Buck
This may be verging outside of the range of "language-data" and veering towards "internals", but I'd sort of like to hash out an idea to make sure that I'm thinking straight. When I heard about transpose() (as well as reshape(), etc), I was concerned about the time it would take to execute the

Re: Implementing RFC 272

2000-09-23 Thread c . soeller
Buddha Buck wrote: > When I heard about transpose() (as well as reshape(), etc), I was > concerned about the time it would take to execute these complex > operations. To wit, naively, I believed that a lot of data shuffling > would be necessary. If I understand your message correctly this is ex