!48107 Remove invalid example in tensor doc

Merge pull request !48107 from zyli2020/bug_fix
This commit is contained in:
i-robot 2023-01-30 01:37:57 +00:00 committed by Gitee
commit 39349cb4c5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 0 additions and 33 deletions

View File

@ -702,14 +702,6 @@ class Tensor(Tensor_):
Returns:
True or False
Examples:
>>> from mindspore import Tensor
>>> import numpy as np
>>> x = Tensor(np.array([2000000000, 256], dtype=np.float32))
>>> ret = x.is_persistent_data()
>>> print(ret)
True
"""
return Tensor_.is_persistent_data(self)
@ -721,15 +713,6 @@ class Tensor(Tensor_):
Returns:
A numpy ndarray which shares the same underlying storage with the slice of tensor data.
Examples:
>>> from mindspore import Tensor
>>> import numpy as np
>>> x = Tensor(np.array([2000000000, 256], dtype=np.float32))
>>> y = x.asnumpy_of_slice_persistent_data(0, 0)
>>> y[0] = 11
>>> print(x[0])
11
"""
return Tensor_.asnumpy_of_slice_persistent_data(self, param_key, slice_index)
@ -739,14 +722,6 @@ class Tensor(Tensor_):
Returns:
Num of slice.
Examples:
>>> from mindspore import Tensor
>>> import numpy as np
>>> x = Tensor(np.array([2000000000, 256], dtype=np.float32))
>>> y = x.slice_num_of_persistent_data()
>>> print(y)
5
"""
return self.slice_num_of_persistent_data_
@ -756,14 +731,6 @@ class Tensor(Tensor_):
Returns:
The slice shape of tensor.
Examples:
>>> from mindspore import Tensor
>>> import numpy as np
>>> x = Tensor(np.array([2000000000, 256], dtype=np.float32))
>>> y = x.slice_shape_of_persistent_data()
>>> print(y)
[400000000, 256]
"""
return self.slice_shape_of_persistent_data_