[SS-2319] vectorize(): inconsistent treatment of functions returning matrices

[SS-2319] vectorize(): inconsistent treatment of functions returning matrices - Messages

#1 Posted: 4/23/2016 1:15:07 AM
Mike Kaganski

Mike Kaganski

184 likes in 434 posts.

Group: User

vectorize-functions-inconsistent.sm (3.88 KiB) downloaded 612 time(s).

In the attachment, all four formulas should produce 3-element column vector with all elements equal to 1. Actually, only vectorize(range(1,3)≠0) and vectorize(mat(0,0,0,3,1)≡0) give predicted result; vectorize(stack(1,1,1)≠0) and vectorize(matrix(3,1)≡0) give wrong results. You may see that despite decorated appearance of former two, the structure of all cases is the same.

Anticipating possible "solutions": yes, I know of Davide's Custom Functions' Ones(#).

All used functions are built-in, all are known to return matrices, so the observed result is inconsistent.

I consider this a manifestation of SS-2319.
С уважением, Михаил Каганский
  • New Posts
  • No New Posts