Re: Bizarre semantic of Mat

Joerg Arndt <[email protected]> Wed, 17 Jan 2024 07:50:56 +0100
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
? v=[1,2,3,4];
? matrix(#v,1,r,c,v[r])

[1]

[2]

[3]

[4]

? matrix(1,#v,r,c,v[c])

[1 2 3 4]


Best regards,   jj


* Ilya Zakharevich <[email protected]> [Jan 17. 2024 07:39]:
> Today I (finally) looked through the documentation of Mat() — and it
> seems to be very convenient for interactive usage!  On the other hand,
> such “cute” semantics have a tendency to become a limiting factor when
> one wants to write down general-purpose algorithms… 
> 
> 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!
> 
> Thanks,
> Ilya