ams.core.service.NumExpandDim#
- class ams.core.service.NumExpandDim(u: Callable, axis: int = 0, args: dict = None, name: str = None, tex_name: str = None, unit: str = None, info: str = None, vtype: Type = None, array_out: bool = True, no_parse: bool = False, sparse: bool = False)[source]#
Expand the dimensions of the input array along a specified axis using NumPy's
np.expand_dims(u.v, axis=axis).- Parameters:
- uCallable
Input.
- axisint
Axis along which to expand the dimensions (default is 0).
- namestr, optional
Instance name.
- tex_namestr, optional
TeX name.
- unitstr, optional
Unit.
- infostr, optional
Description.
- vtypeType, optional
Variable type.
- array_outbool, optional
Whether to force the output to be an array.
- sparse: bool, optional
True to return output as scipy csr_matrix.
- __init__(u: Callable, axis: int = 0, args: dict = None, name: str = None, tex_name: str = None, unit: str = None, info: str = None, vtype: Type = None, array_out: bool = True, no_parse: bool = False, sparse: bool = False)[source]#
Methods
Assign memory for
self.vand set the array to zero.evaluate(*args, **kwargs)Return all the indexes of this item.
get_idx()Return name in a list
parse(*args, **kwargs)update()Update the Parameter value.
Attributes