numpy.matrix.A#

property

property matrix.A#

返回 self 作为一个 ndarray 对象.

等同于 np.asarray(self).

参数:
None
返回:
retndarray

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]])