tsa.statespace.tools.validate_matrix_shape()

statsmodels.tsa.statespace.tools.validate_matrix_shape

statsmodels.tsa.statespace.tools.validate_matrix_shape(name, shape, nrows, ncols, nobs) [source]

Validate the shape of a possibly time-varying matrix, or raise an exception

Parameters:

name : str

The name of the matrix being validated (used in exception messages)

shape : array_like

The shape of the matrix to be validated. May be of size 2 or (if the matrix is time-varying) 3.

nrows : int

The expected number of rows.

ncols : int

The expected number of columns.

nobs : int

The number of observations (used to validate the last dimension of a time-varying matrix)

Raises:

ValueError

If the matrix is not of the desired shape.

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.tsa.statespace.tools.validate_matrix_shape.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部