Hi -- On Mon, 11 Dec 2006, Eric Hodel wrote: > On Dec 10, 2006, at 02:12 , chen li wrote: > >> original 1D array >> [2294.4, 3481.2, 2716.7, 1672.2, 1135.3, 2103.5, >> 591.1, 648.5, 603.0,..., 11900.4, 10823.3, 10090.5, >> 3271.5, 4560.7, 3617.6,1815.7, 855.3, 915.4,583.3, >> 601.1, 565.6, 459.2, 349.3, 358.0, 351.1,340.2, >> 488.2,13.0, 14.1, 14.1, 16.2, 16.1, 27.1] >> >> I change 1D array into 2D array: >> 2D array in 8 columns x 12 rows or >> 2D array in 12 columns x8 rows. >> >> If column number is <10 I get expected output >> format(each line is a row containing 8 columns): >> [[2294.4, 3481.2, 2716.7, 1672.2, 1135.3, 2103.5, >> 591.1, 648.5], >> >> ... >> [340.2, 488.2,13.0, 14.1, 14.1, 16.2, 16.1, 27.1] >> >> ] >> >> If column number is >=10 let say 12, I get unwanted >> output(each line is a column): >> >> [[2294.4, >> 3481.2, >> 2716.7, >> 1672.2, >> 1135.3, >> 2103.5, >> 591.1, >> 648.5, >> 603.0, >> 477.2, >> 264.1, >> 626.5], > > require 'pp' > > PP.pp arr, 100 # you'll have to fudge this number I think you have to give it a middle argument (an output handle) so as to keep the args lined up: PP.pp(arr, $>, 100) David -- Q. What's a good holiday present for the serious Rails developer? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) aka The Ruby book for Rails developers! Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)