Append(,) 是如何工作的?
How does Append (,) work?
附加 ,
说:
x,y appends items of y to items of x after:
- Reshaping an atomic argument to the shape of the items of the other,
- Bringing the arguments to a common rank (of at least 1) by repeatedly itemizing (,:) any of lower rank, and
- Bringing them to a common shape by padding with fill elements in the manner described in Section II B.
1.是什么意思?第 2 步和第 3 步不这样做吗? 1. 是否可以从列表中删除并且结果仍然相同(我认为它不能但想了解为什么)?
- Reshaping an atomic argument to the shape of the items of the other,
此步骤将重复一个参数,如果它是原子的,这与 "padding with fill elements"(步骤 3.)不同。比较标量 5
与列表 1
(即一个元素的列表):
NB. scalar 5, atomic case (step 1. applies), argument is repeated
(i. 2 3), 5
0 1 2
3 4 5
5 5 5
NB. list 1, non-atomic case (step 2. and 3. apply), argument is padded
(i. 2 3), 1
0 1 2
3 4 5
5 0 0
附加 ,
说:
x,y appends items of y to items of x after:
- Reshaping an atomic argument to the shape of the items of the other,
- Bringing the arguments to a common rank (of at least 1) by repeatedly itemizing (,:) any of lower rank, and
- Bringing them to a common shape by padding with fill elements in the manner described in Section II B.
1.是什么意思?第 2 步和第 3 步不这样做吗? 1. 是否可以从列表中删除并且结果仍然相同(我认为它不能但想了解为什么)?
- Reshaping an atomic argument to the shape of the items of the other,
此步骤将重复一个参数,如果它是原子的,这与 "padding with fill elements"(步骤 3.)不同。比较标量 5
与列表 1
(即一个元素的列表):
NB. scalar 5, atomic case (step 1. applies), argument is repeated
(i. 2 3), 5
0 1 2
3 4 5
5 5 5
NB. list 1, non-atomic case (step 2. and 3. apply), argument is padded
(i. 2 3), 1
0 1 2
3 4 5
5 0 0