ones¶
- MapdlMath.ones(nrow, ncol=None, dtype=<class 'numpy.float64'>)¶
Create a vector or matrix containing all ones
- Parameters
- Returns
Examples
Create a ones vector.
>>> from ansys.mapdl.core import launch_mapdl >>> mapdl = launch_mapdl() >>> mm = mapdl.math() >>> vec = mm.ones(10)
Create a ones matrix.
>>> mat = mm.ones(10, 10)