numpy.matrix.getA

原文:https://docs.scipy.org/doc/numpy/reference/generated/numpy.matrix.getA.html

译者:飞龙 UsyiyiCN

校对:(虚位以待)

matrix.getA()[source]

self作为ndarray对象返回。

等效于np.asarray(self)

参数:

返回:

ret:ndarray

self作为ndarray

例子

>>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.getA()
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11]])