BUG DESCRIPTION:----------------justify() misworks for hypermatrices: only the first page is processed:--> m = ["a" "bc" ; "cd" "e"];--> h = cat(3,m,m) h = (:,:,1) "a" "bc" "cd" "e" (:,:,2) "a" "bc" "cd" "e" --> justify(h,"l") ans =(:,:,1) "a " "bc" <<< OK: "a" and "e" are padded "cd" "e "(:,:,2) "a" "bc" <<< KO: "a" and "e" are unchanged "cd" "e" ERROR LOG:----------HOW TO REPRODUCE THE BUG:-------------------------m = ["a" "bc" ; "cd" "e"];h = cat(3, m, m);hj = justify(h,"l");hj([5 8]) == ["a ","e "]OTHER INFORMATION:------------------Since 6.0.0 (before hypermatrices yielded an error), and still in 6.1.1 now.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
There was no default position. 'left' is proposed as so.
code rewritten for 'r' and 'c', to fasten it:
Benchmark for a 1000x1000 matrix of random strings
made of 0 to 7 "a" to "z" characters.
in seconds: mean over 10 runs (stdev):
mode FORMER CODE PROPOSED
'r' 5.62 (0.04) 0.796 (0.008) speed x 7
'c' 11.28 (0.10) 1.245 (0.030) speed x 9
L = grand(1000,1000,"uin",0,7); cs = cumsum(L)(:);
t = matrix(strsplit(ascii(grand(1,cs(
)+2,"uin",ascii("a"), ascii("z"))), cs)(1:
-1), size(L));
//t(1:10,1:5)
tim = []
for i = 1:5
tic()
tj = justify(t, "r");
tim = [tim toc()];
end
disp(mean(tim), stdev(tim))