mat#
- AnsMath.mat(nrow=1, ncol=1, dtype=<class 'numpy.float64'>, init=None, name=None, asarray=False)#
Create a matrix.
- Parameters:
- nrow
int,optional Number of rows. The default is
1.- ncol
int,optional Number of columns. The default is
1.- dtype
np.dtype,optional NumPy data type of the matrix. The options are
np.double,np.int32, andnp.int64. The default isnp.double.- init
str,optional Initialization options. Options are
"zeros","ones", or"rand". The default is"zeros".- name
str,optional AnsMath matrix name. The default is
None, in which case a name is automatically generated.- asarraybool,
optional Whether to return a NumPy array rather than an AnsMath matrix. The default is
False.
- nrow
- Returns:
AnsMatornumpy.ndarrayAnsMath matrix or NumPy array matrix, depending on the value for the
asarrayparameter.