Why Tensor.clone() is called clone and not copy?

(Гоша Новиков) #1

In much older library numpy method that copy ndarray is called copy. Why in torch the same method is called clone? Are there any specific reasons?

(Alban D) #2


I think this is mostly for historical reasons in particular copy (now copy_) was used a long time ago to copy into a tensor while clone is used to create an identical clone of a given Tensor.