MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / append

Function append

python/paddle/pir/math_op_patch.py:1065–1077  ·  view source on GitHub ↗

Notes: The type of Tensor must be Tensor Array.

(self, var)

Source from the content-addressed store, hash-verified

1063 pass
1064
1065 def append(self, var):
1066 """
1067 Notes:
1068 The type of Tensor must be Tensor Array.
1069
1070 """
1071 if not self.is_dense_tensor_array_type():
1072 raise TypeError(
1073 f"Only Tensor with DenseTensorArray support `append` method, but received {self}"
1074 )
1075 from paddle.tensor.array import array_length, array_write
1076
1077 array_write(x=var, i=array_length(self), array=self)
1078
1079 def pop(self, *args):
1080 """

Callers 7

pstring.hFile · 0.50
push_backMethod · 0.50
appendMethod · 0.50
assignMethod · 0.50
insertMethod · 0.50
vlist_of_dictMethod · 0.50

Calls 3

array_writeFunction · 0.90
array_lengthFunction · 0.90
TypeErrorClass · 0.85

Tested by 1

vlist_of_dictMethod · 0.40