On Fri, Jun 25, 2010 at 4:03 PM, Craig DeForest <[email protected]> wrote: > Hi, Puneet, > > This appears to be a bug in dummy.
Ok. I've added the bug report to the sf bug tracker. Thanks. > It appears that dummy is meant to supply > extra dummy dimensions of size 1 if you run off the end of the original > dimension list. But the extra dummy dimension code appears to have a > fencepost error, so that the one-dim-too-high case gives the same answer as > the add-one-extra-dim-on-the-end case, (and the two-dims-too-high case gives > the answer that should be given by the one-dim-too-high case). > > Congratulations, you are clearly traversing the code differently than most > folks, since you are shaking out more bugs per square meter than I thought > was possible. Dummy() has been around for a long time. > > > > On Jun 25, 2010, at 2:58 PM, P Kishor wrote: > >> The subject line is rather appropriate. Nevertheless >> >> >> perldl> $a = sequence 5 >> perldl> p $a >> [0 1 2 3 4] >> $a Double D [5] P 0.04Kb >> >> perldl> $b = $a->dummy(0, 3) >> perldl> p $b >> [ >> [0 0 0] >> [1 1 1] >> [2 2 2] >> [3 3 3] >> [4 4 4] >> ] >> $b Double D [3,5] VC 0.00Kb >> >> perldl> $c = $a->dummy(1, 3) >> perldl> p $c >> [ >> [0 1 2 3 4] >> [0 1 2 3 4] >> [0 1 2 3 4] >> ] >> $c Double D [5,3] VC 0.00Kb >> >> perldl> $d = $a->dummy(2, 3) >> perldl> p $d >> [ >> [0 1 2 3 4] >> [0 1 2 3 4] >> [0 1 2 3 4] >> ] >> $d Double D [5,3] VC 0.00Kb >> >> >> Whaa! Why did $a->dummy(1,3) and $a->dummy(2,3) produce the same result? >> >> >> >> -- >> dummy (identity obscured to prevent embarrassment) >> >> _______________________________________________ >> Perldl mailing list >> [email protected] >> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> > > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
