You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure but this might occur since the fn functions borrowed args (which is default) as immutable references. copy constructor and destructor are not invoked for a borrow hence you can't return a copy
Bug description
It looks like it is only possible to reshape a tensor immediately following it's definition.
Steps to reproduce
The following works as expected, when inlining all statements one after another:
If the reshape is, however, placed inside a different function than the code no longer compiles:
Which gives the compilation error:
Am I missing something obvious?
Reading the Tensor.reshape docs, I am expecting
a.reshape
to return a copy. So no mutations on the function's argumenta
, right?Thanks in advance,
Hylke
System information
The text was updated successfully, but these errors were encountered: