tools.tools.unsqueeze()

statsmodels.tools.tools.unsqueeze

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

Unsqueeze a collapsed array

1
2
3
4
5
6
7
8
9
10
>>> 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)
>>>
doc_statsmodels
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.