ams.core.matprocessor.MParam#
- class ams.core.matprocessor.MParam(name: str | None = None, tex_name: str | None = None, info: str | None = None, unit: str | None = None, v: ndarray | None = None, owner: object | None = None, sparse: bool | None = False, col_names: list | None = None, row_names: list | None = None)[source]#
Class for matrix parameters built from the system.
MParam is designed to be a subclass of RParam for routine parameters management.
- Parameters:
- namestr, optional
Name of this parameter. If not provided, name will be set to the attribute name.
- tex_namestr, optional
LaTeX-formatted parameter name. If not provided, tex_name will be assigned the same as name.
- infostr, optional
A description of this parameter
- unitstr, optional
Unit of the parameter.
- vnp.ndarray, optional
Matrix value of the parameter.
- ownerobject, optional
Owner of the MParam, usually the MatProcessor instance.
- sparsebool, optional
If True, the matrix is stored in sparse format.
- col_nameslist, optional
Column names of the matrix.
- row_nameslist, optional
Row names of the matrix.
- __init__(name: str | None = None, tex_name: str | None = None, info: str | None = None, unit: str | None = None, v: ndarray | None = None, owner: object | None = None, sparse: bool | None = False, col_names: list | None = None, row_names: list | None = None)[source]#
Methods
evaluate(*args, **kwargs)export_csv([path])Export the matrix to a CSV file.
Return all the indexes of this item.
get_idx()parse(*args, **kwargs)update()Update the Parameter value.
Attributes
Return the class name
Return the szie of the parameter.
Return the shape of the parameter.
Return the size.
Return the value of the parameter.