W3cubDocs

/Statsmodels

statsmodels.tools.tools.unsqueeze

statsmodels.tools.tools.unsqueeze(data, axis, oldshape) [source]

Unsqueeze a collapsed array

>>> from numpy import mean
>>> from numpy.random import standard_normal
>>> x = standard_normal((3,4,5))
>>> m = mean(x, axis=1)
>>> m.shape
(3, 5)
>>> m = unsqueeze(m, 1, x.shape)
>>> m.shape
(3, 1, 5)
>>>

© 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.tools.tools.unsqueeze.html