Cytnx icon indicating copy to clipboard operation
Cytnx copied to clipboard

permute has different syntax for Tensor and UniTensor

Open manuschneider opened this issue 2 years ago • 1 comments

permute has a different syntax for Tensor and UniTensor. Example: Tensor: t.permute(1,2,0) UniTensor: uT.permute([1,2,0])

This is confusing. I would suggest that we agree on one syntax for both (the Tensor syntax is similar to other libraries I guess, while the second is more flexible if the rank of the tensor is flexible). Or we provide both ways for Tensors and UniTensors. The decision should then also be applied to reshape (which uses the syntax (int, int, int, ...) for both tensors at the moment).

manuschneider avatar Oct 05 '23 07:10 manuschneider

There are some ambiguous for this, because UniTensor can accept string label, as well as integer.

On python side it should be possible, but on C++ side the API needs to think carefully to support this

kaihsin avatar Oct 06 '23 19:10 kaihsin