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

2000-09-24 Thread Jeremy Howard
[EMAIL PROTECTED] wrote: > 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

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

2000-09-24 Thread Jeremy Howard
Karl Glazebrook: > Well if a dimension has N elements then the numbering of the elements > runs 0...N-1 > > similarly if the shape has M dimensions, then the numbering of the > dimensions is 0..M-1 > > the arguments to reshape should be sizes not last elements (i.e. N's > not N-1's). > > I think t

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

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: > 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 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 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: > > 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 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 272 (v1) Arrays: transpose()

2000-09-22 Thread c . soeller
Jeremy Howard wrote: > > Karl Glazebrook wrote: > > you should look at the PDL mv() and xchg() methods > > and factor this into your thinking! > > > Actually, the RFC is based on PDL's xchg()! I forgot to document using > negative numbers to count from the last dimension--I'll add that into the >

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

2000-09-22 Thread Karl Glazebrook
Jeremy Howard wrote: > > Karl Glazebrook wrote: > > you should look at the PDL mv() and xchg() methods > > and factor this into your thinking! > > > Actually, the RFC is based on PDL's xchg()! I forgot to document using > negative numbers to count from the last dimension--I'll add that into the

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

2000-09-22 Thread Jeremy Howard
Karl Glazebrook wrote: > you should look at the PDL mv() and xchg() methods > and factor this into your thinking! > Actually, the RFC is based on PDL's xchg()! I forgot to document using negative numbers to count from the last dimension--I'll add that into the next version. Are there any other dif

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

2000-09-22 Thread Karl Glazebrook
Jeremy: you should look at the PDL mv() and xchg() methods and factor this into your thinking! Karl

RFC 272 (v1) Arrays: transpose()

2000-09-21 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Arrays: transpose() =head1 VERSION Maintainer: Jeremy Howard <[EMAIL PROTECTED]> Date: 22 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 272 Version: 1 Status: Developing =head1 ABSTRACT It