#numpy
NumPy
Smart use of ‘:’ to extract the right shape
Sometimes you encounter a 3-dim array that is of shape (N, T, D), while your function requires a shape of (N, D). At a time like this, reshape() will do more harm than good, so you are left with one simple solution:
Example:for t in xrange(T):
Share and Support
x[:, t, :] = # ...
@Python_Codes
>>Click here to continue<<