Skip to content

Commit 511aeb8

Browse files
authored
issue/495 修复 infinicore.Tensor.copy_infinicore.Tensor.as_strided 的行为错误
1 parent 93e7d88 commit 511aeb8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python/infinicore/tensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ def is_is_pinned(self):
5757
return self._underlying.is_is_pinned()
5858

5959
def copy_(self, src):
60-
return Tensor(self._underlying.copy_(src._underlying))
60+
self._underlying.copy_(src._underlying)
6161

6262
def to(self, *args, **kwargs):
6363
return Tensor(
6464
self._underlying.to(*tuple(arg._underlying for arg in args), **kwargs)
6565
)
6666

6767
def as_strided(self, size, stride):
68-
Tensor(self._underlying.as_strided(size, stride))
68+
return Tensor(self._underlying.as_strided(size, stride))
6969

7070
def contiguous(self):
7171
return Tensor(self._underlying.contiguous())

0 commit comments

Comments
 (0)