Back to Forum | View unanswered posts | View active topics
Topic review - Get size of bigintmat |
Author |
Message |
|
|
Post subject: |
Re: Get size of bigintmat |
|
|
The size function in Singular for a matrix is very misleading, though may be useful is some situations. Further as per the man page of size, it does not accept bigintmat. The best way to get the size of a matrix / intmat / bigintmat is to use nrows and ncols functions. Code: > bigintmat mymat[2][4] = 1,2,3,4,5,6,8; > nrows (mymat); > ncols (mymat);
VInay
The size function in Singular for a matrix is very misleading, though may be useful is some situations. Further as per the man page of [url=https://www.singular.uni-kl.de/Manual//4-0-3/sing_395.htm#SEC435]size[/url], it does not accept bigintmat.
The best way to get the size of a matrix / intmat / bigintmat is to use nrows and ncols functions.
[code] > bigintmat mymat[2][4] = 1,2,3,4,5,6,8; > nrows (mymat); > ncols (mymat); [/code]
VInay
|
|
|
|
Posted: Wed Sep 28, 2016 9:23 am |
|
|
|
|
|
Post subject: |
Get size of bigintmat |
|
|
Hi all, if I call size for a bigintmat, it will cause an error. Code: > bigintmat mymat[2][4] = 1,2,3,4,5,6,8; > size(mymat); ? size(`bigintmat`) failed ? expected size(`bigint`) ? expected size(`number`) ? expected size(`resolution`) ? expected size(`string`) ? expected size(`poly`) ? expected size(`vector`) ? expected size(`ideal`) ? expected size(`module`) ? expected size(`matrix`) ? expected size(`intvec`) ? expected size(`intmat`) ? expected size(`list`) ? expected size(`ring`)
How can I get the total number of entries of a bigintmat besides explicit conversion to intmat? I'd like to be able to call size(mymat) where mymat is of type bigintmat.
Hi all,
if I call size for a bigintmat, it will cause an error.
[code] > bigintmat mymat[2][4] = 1,2,3,4,5,6,8; > size(mymat); ? size(`bigintmat`) failed ? expected size(`bigint`) ? expected size(`number`) ? expected size(`resolution`) ? expected size(`string`) ? expected size(`poly`) ? expected size(`vector`) ? expected size(`ideal`) ? expected size(`module`) ? expected size(`matrix`) ? expected size(`intvec`) ? expected size(`intmat`) ? expected size(`list`) ? expected size(`ring`) [/code] How can I get the total number of entries of a bigintmat besides explicit conversion to intmat? I'd like to be able to call size(mymat) where mymat is of type bigintmat.
|
|
|
|
Posted: Tue Sep 27, 2016 4:19 pm |
|
|
|
|
|
It is currently Fri May 13, 2022 10:56 am
|
|