Looking at the definition of whichND(), it seems like having it return a shape [nfound,0] piddle would be more consistent w.r.t. the principle of least surprise. However, the question is whether it can be made to work with the range() and pdl constructor code and whether there are any other snags from that implementation.
Cheers, Chris On Mon, Jan 2, 2012 at 4:06 AM, Bryan Jurish <[email protected]> wrote: > On 2011-12-30 13:53, chm wrote: >> On 12/27/2011 3:29 PM, Bryan Jurish wrote: >>> >>>> From a more principled (as opposed to purely pragmatic) standpoint, I >>> think there are good reasons to allow size-0 dimensions across the >>> board > ... >>> to provide identity elements for glue(). >> >> The identity element argument seems like a plausible >> justification/motivation for the existence and meaning of >> such piddle shapes with 0-length dimensions. > > ... just a note after the fact: it seems that the return value of > whichND(zeroes(4,3)) has changed in the 2.4.10 release candidate as > well. With $,=' '; I get: > > ##-- v2.4.7_001 (debian squeeze) > print whichND( ones(4,3))->dims; ##-- "2 12" > print whichND(zeroes(4,3))->dims; ##-- "2 0" > > ##-- v2.4.9_015 > print whichND( ones(4,3))->dims; ##-- "2 12" > print whichND(zeroes(4,3))->dims; ##-- "0" _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
