Ilya Zakharevich on Thu, 18 Jan 2024 08:17:32 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Bizarre semantic of Mat |
On Wed, Jan 17, 2024 at 07:54:51AM +0100, Loïc Grenié wrote: > > Today I (finally) looked through the documentation of Mat() — and it > > seems to be very convenient for interactive usage! On the other hand, > I confess I use the bizarre special-cases all the time... Right: (as I said) it is very convenient if one knows the content of a vector… > Anyway, if you have a column C and want a 1-column matrix, > with C as only colon you can make Mat(vector(1,n,C)) (yes, I know, > this is anti-intuitive, long, non-convenient, not explicitly documented, > needed only because of bizarre semantics and uber-dirty). Wow!!! This is a very impressive ping-pong-with-APIs! It goes without saying that I would have rather preferred to have Mat(C, 1) to do this… Thanks, Ilya