- TensorVariable.reshape(shape, ndim=None)#
Return a reshaped view/copy of this variable.
Returns a view of this
Variablethat has been reshaped as in
numpy.reshape. If the shape is a
Variableargument, then you might need to use the optional
ndimparameter to declare how many elements the shape has, and therefore how many dimensions the reshaped
shape – Something that can be converted to a symbolic vector of integers.
ndim – The length of the shape. Passing None here means for Aesara to try and guess the length of
This has a different signature than numpy’s ndarray.reshape! In numpy you do not need to wrap the shape arguments in a tuple, in aesara you do need to.