Re: Bizarre semantic of Mat

Bill Allombert <[email protected]> Thu, 18 Jan 2024 11:16:03 +0100
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <Zaj6Y9+uVcmFNPeY@seventeen>
On Wed, Jan 17, 2024 at 11:19:31PM -0800, Ilya Zakharevich wrote:
> On Wed, Jan 17, 2024 at 11:31:39AM +0100, Bill Allombert wrote:
> > > Is there a simple way to convert a vector-column into a 1 column
> > > matrix (without using matrix())?  Mat() is almost there — except for
> > > bizarre special-cases — which are impossible to switch off!
> > 
> > There is a trick:
> > 
> > ? V=[[1]~,[2]~,[3]~]
> > %28 = [[1]~,[2]~,[3]~]
> > ? Mat(V~)~
> > %29 = Mat([[1]~,[2]~,[3]~])
> 
> Hmm?  It seems that this is “another ‘cute special case’” — which
> requires PRIOR KNOWLEDGE about the nature of elements of the vector.
> Does not it?

This was implemented before matconcat. Nowadays, it might be
clearer to use matconcat.

Cheers,
Bill.