asarray#
- AnsMat.asarray(dtype=None)[source]#
Returns vector as a numpy array.
- Parameters:
- dtype
numpy.dtype
,optional
Numpy data type
- dtype
- Returns:
np.ndarray
Numpy array with the defined data type
- Return type:
Examples
>>> from ansys.mapdl.core import launch_mapdl >>> mapdl = launch_mapdl() >>> mm = mapdl.math >>> v = mm.ones(10) >>> v.asarray() [1. 1. 1. 1. 1. 1. 1. 1. 1. 1.] >>> v.asarray(dtype=np.int_) [1 1 1 1 1 1 1 1 1 1]