Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.matrix.var

matrix.var(axis=None,dtype=None,out=None,ddof=0)[source]

Returns the variance of the matrix elements, along the given axis.

Refer tonumpy.var for full documentation.

See also

numpy.var

Notes

This is the same asndarray.var, except that where anndarray wouldbe returned, amatrix object is returned instead.

Examples

>>>x=np.matrix(np.arange(12).reshape((3,4)))>>>xmatrix([[ 0,  1,  2,  3],        [ 4,  5,  6,  7],        [ 8,  9, 10, 11]])>>>x.var()11.916666666666666>>>x.var(0)matrix([[ 10.66666667,  10.66666667,  10.66666667,  10.66666667]])>>>x.var(1)matrix([[ 1.25],        [ 1.25],        [ 1.25]])

Previous topic

numpy.matrix.transpose

Next topic

numpy.matrix.view

  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Jun 10, 2017.
  • Created usingSphinx 1.5.3.

[8]ページ先頭

©2009-2025 Movatter.jp