ConstantArray[c,n]
生成元素 c 的 n 个副本的列表.
ConstantArray[c,{n1,n2,…}]
生成一个 数组,它包括元素 c 的副本的嵌套列表.


ConstantArray
ConstantArray[c,n]
生成元素 c 的 n 个副本的列表.
ConstantArray[c,{n1,n2,…}]
生成一个 数组,它包括元素 c 的副本的嵌套列表.
范例
打开所有单元 关闭所有单元应用 (3)
属性和关系 (3)
ConstantArray[c,dims] 有 Dimensions[dims]:
ConstantArray[c,dims] 等于 SparseArray[{},dims,c]:
Normal[s] 与 ConstantArray[c,dims] 相同:
ConstantArray[c,dims] 等价于 Apply[Table[c,##]&,Map[List,dims]]:
文本
Wolfram Research (2007),ConstantArray,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ConstantArray.html (更新于 2008 年).
CMS
Wolfram 语言. 2007. "ConstantArray." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2008. https://reference.wolfram.com/language/ref/ConstantArray.html.
APA
Wolfram 语言. (2007). ConstantArray. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/ConstantArray.html 年
BibTeX
@misc{reference.wolfram_2025_constantarray, author="Wolfram Research", title="{ConstantArray}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ConstantArray.html}", note=[Accessed: 17-September-2025]}
BibLaTeX
@online{reference.wolfram_2025_constantarray, organization={Wolfram Research}, title={ConstantArray}, year={2008}, url={https://reference.wolfram.com/language/ref/ConstantArray.html}, note=[Accessed: 17-September-2025]}